TMElyralab / MuseTalk

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

使用 MuseV 对图片生成视频,然后再用 realtime 模式生成 avator 会产生错误 ValueError: height and width must be > 0 #224

Open Phoenix500526 opened 1 week ago

Phoenix500526 commented 1 week ago

realtime.yaml 文件设置如下:

avator_1:
 preparation: True
 bbox_shift: 5
 video_path: "data/video/panpan.mp4"
 audio_clips:
     audio_0: "data/audio/yongen.wav"
     audio_1: "data/audio/sun.wav"

执行以下命令:

python -m scripts.realtime_inference --inference_config configs/inference/realtime.yaml

Traceback (most recent call last): File "/home/phoenix/miniconda3/envs/musetalk/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/phoenix/miniconda3/envs/musetalk/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/home/phoenix/MuseTalk/scripts/realtime_inference.py", line 322, in avatar = Avatar( File "/home/phoenix/miniconda3/envs/musetalk/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, kwargs) File "/home/phoenix/miniconda3/envs/musetalk/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 129, in func = cast(F, lambda *args, *kwargs: orig_func(args, kwargs)) File "/home/phoenix/MuseTalk/scripts/realtime_inference.py", line 72, in init self.init() File "/home/phoenix/MuseTalk/scripts/realtime_inference.py", line 84, in init self.prepare_material() File "/home/phoenix/MuseTalk/scripts/realtime_inference.py", line 177, in prepare_material mask,crop_box = get_image_prepare_material(frame,face_box) File "/home/phoenix/MuseTalk/musetalk/utils/blending.py", line 73, in get_image_prepare_material mask_image = face_seg(face_large) File "/home/phoenix/MuseTalk/musetalk/utils/blending.py", line 23, in face_seg seg_image = seg_image.resize(image.size) File "/home/phoenix/miniconda3/envs/musetalk/lib/python3.10/site-packages/PIL/Image.py", line 2365, in resize return self._new(self.im.resize(size, resample, box)) ValueError: height and width must be > 0

luxiongx commented 3 days ago

有几帧画面没检测到人脸。