TMElyralab / MuseTalk

MuseTalk: Real-Time High Quality Lip Synchorization with Latent Space Inpainting
Other
1.84k stars 219 forks source link

抛异常AttributeError: 'NoneType' object has no attribute 'shape' #119

Open printff opened 3 weeks ago

printff commented 3 weeks ago

Win10 显卡3080 CUDA 12.5 下载的README上的第三方windows整合包,点Generate后,大概500秒页面提示错误,控制台打印日志如下。

 启动中,请耐心等待 bilibili@十字鱼 https://space.bilibili.com/893892
Already download the model.
Loads checkpoint by local backend from path: ./models/dwpose/dw-ll_ucoco_384.pth
cuda start
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
IMPORTANT: You are using gradio version 4.26.0, however version 4.29.0 is available, please upgrade.
--------
Exception in callback _ProactorBasePipeTransport._call_connection_lost(None)
handle: <Handle _ProactorBasePipeTransport._call_connection_lost(None)>
Traceback (most recent call last):
  File "C:\ai\MuseTalk\.glut\lib\asyncio\events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "C:\ai\MuseTalk\.glut\lib\asyncio\proactor_events.py", line 165, in _call_connection_lost
    self._sock.shutdown(socket.SHUT_RDWR)
ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。
IMAGEIO FFMPEG_WRITER WARNING: input image is not divisible by macro_block_size=16, resizing from (1080, 1920) to (1088, 1920) to ensure video compatibility with most codecs and players. To prevent resizing, make your input image divisible by the macro_block_size or set the macro_block_size to 1 (risking incompatibility).
[swscaler @ 00000246e93d8d80] Warning: data is not aligned! This can lead to a speed loss
Exception in callback _ProactorBasePipeTransport._call_connection_lost(None)
handle: <Handle _ProactorBasePipeTransport._call_connection_lost(None)>
Traceback (most recent call last):
  File "C:\ai\MuseTalk\.glut\lib\asyncio\events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "C:\ai\MuseTalk\.glut\lib\asyncio\proactor_events.py", line 165, in _call_connection_lost
    self._sock.shutdown(socket.SHUT_RDWR)
ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。
video in 30.0 FPS, audio idx in 50FPS
extracting landmarks...time consuming
reading images...
[ WARN:0@402.531] global loadsave.cpp:248 cv::findDecoder imread_('./results/output\6月13日1\00000000.png'): can't open/read file: check file path/integrity
[ WARN:0@402.536] global loadsave.cpp:248 cv::findDecoder imread_('./results/output\6月13日1\00000001.png'): can't open/read file: check file path/integrity
...中间省略..
[ WARN:0@406.710] global loadsave.cpp:248 cv::findDecoder imread_('./results/output\6月13日1\00000667.png'): can't open/read file: check file path/integrity
[ WARN:0@406.715] global loadsave.cpp:248 cv::findDecoder imread_('./results/output\6月13日1\00000668.png'): can't open/read file: check file path/integrity
get key_landmark and face bounding boxes with the bbox_shift: -7
Traceback (most recent call last):
  File "C:\ai\MuseTalk\.glut\lib\site-packages\gradio\queueing.py", line 527, in process_events
    response = await route_utils.call_process_api(
  File "C:\ai\MuseTalk\.glut\lib\site-packages\gradio\route_utils.py", line 261, in call_process_api
    output = await app.get_blocks().process_api(
  File "C:\ai\MuseTalk\.glut\lib\site-packages\gradio\blocks.py", line 1786, in process_api
    result = await self.call_function(
  File "C:\ai\MuseTalk\.glut\lib\site-packages\gradio\blocks.py", line 1338, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "C:\ai\MuseTalk\.glut\lib\site-packages\anyio\to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "C:\ai\MuseTalk\.glut\lib\site-packages\anyio\_backends\_asyncio.py", line 2144, in run_sync_in_worker_thread
    return await future
  File "C:\ai\MuseTalk\.glut\lib\site-packages\anyio\_backends\_asyncio.py", line 851, in run
    result = context.run(func, *args)
  File "C:\ai\MuseTalk\.glut\lib\site-packages\gradio\utils.py", line 759, in wrapper
    response = f(*args, **kwargs)
  File "C:\ai\MuseTalk\.glut\lib\site-packages\gradio\utils.py", line 759, in wrapper
    response = f(*args, **kwargs)
  File "C:\ai\MuseTalk\.glut\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "C:\ai\MuseTalk\app.py", line 173, in inference
    coord_list, frame_list = get_landmark_and_bbox(input_img_list, bbox_shift)
  File "C:\ai\MuseTalk\musetalk\utils\preprocessing.py", line 97, in get_landmark_and_bbox
    results = inference_topdown(model, np.asarray(fb)[0])
  File "C:\ai\MuseTalk\.glut\lib\site-packages\mmpose\apis\inference.py", line 165, in inference_topdown
    h, w = img.shape[:2]
AttributeError: 'NoneType' object has no attribute 'shape'
czk32611 commented 2 weeks ago

可能是某一帧没有检测到人脸

nitinmukesh commented 2 weeks ago

@printff You have a guide to install on Windows??

TheMhv commented 7 hours ago

I had the same problem, I solved it by adding the FFMPEG_PATH system variable