Closed OneMobPsycho100 closed 2 months ago
fps = 1/(time.time()-start)
这里报错了。我们修改一下。你这是运行太快导致变0了吗。。
可以了,速度非常快, 我的显卡是4090d,感谢大佬
enerating the 552-th frame with FPS: 19.80 Generating the 553-th frame with FPS: 221.98 Generating the 554-th frame with FPS: 199.96 Generating the 555-th frame with FPS: 249.97 99%|███████████████████████████████████████████████████████████████████████████████▍| 140/141 [00:14<00:00, 9.67it/s]Generating the 556-th frame with FPS: 20.40 Generating the 557-th frame with FPS: 249.64 Generating the 558-th frame with FPS: 284.82 Generating the 559-th frame with FPS: 249.66 100%|████████████████████████████████████████████████████████████████████████████████| 141/141 [00:14<00:00, 9.69it/s] Generating the 560-th frame with FPS: 20.40 Generating the 561-th frame with FPS: 221.81 Generating the 562-th frame with FPS: 284.95 ffmpeg -y -v fatal -r 25 -f image2 -i ./results/avatars/avator_1/tmp/%08d.png -vcodec libx264 -vf format=rgb24,scale=out_color_matrix=bt709,format=yuv420p -crf 18 ./results/avatars/avator_1/temp.mp4 ffmpeg -y -v fatal -i data/audio/sun.wav -i ./results/avatars/avator_1/temp.mp4 ./results/avatars/avator_1/vid_output/audio_1.mp4 result is save to ./results/avatars/avator_1/vid_output/audio_1.mp4
你好,我出现了同样的问题,请问是修改了代码后才能正常运行吗?我这边对输入视频进行了超分,超分前是可以正常合成的,但是超分后视频就会出现zerodivision的问题~
python -m scripts.realtime_inference --inference_config configs/inference/realtime.yaml
Loads checkpoint by local backend from path: ./models/dwpose/dw-ll_ucoco_384.pth cuda start D:\model\MuseTalk.glut\lib\site-packages\torch\utils_contextlib.py:125: UserWarning: Decorating classes is deprecated and will be disabled in future versions. You should only decorate functions or methods. To preserve the current behavior of class decoration, you can directly decorate the
__init__
method and nothing else. warnings.warn("Decorating classes is deprecated and will be disabled in " {'avator_1': {'preparation': False, 'bbox_shift': 5, 'video_path': 'data/video/sun.mp4', 'audio_clips': {'audio_0': 'data/audio/yongen.wav', 'audio_1': 'data/audio/sun.wav'}}} reading images... 100%|█████████████████████████████████████████████████████████████████████████████| 1100/1100 [00:05<00:00, 195.67it/s] reading images... 100%|████████████████████████████████████████████████████████████████████████████| 1100/1100 [00:00<00:00, 6295.40it/s] Inferring using: data/audio/yongen.wav video in 25 FPS, audio idx in 50FPS start inference 202 processing audio:data/audio/yongen.wav costs 0.0ms 2%|█▋ | 1/51 [00:01<01:18, 1.57s/it]Generating the 0-th frame with FPS: 1.76 Exception in thread Thread-4 (process_frames): Traceback (most recent call last): File "D:\model\MuseTalk.glut\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "D:\model\MuseTalk.glut\lib\threading.py", line 953, in run self._target(*self._args, *self._kwargs) File "D:\model\MuseTalk\scripts\realtime_inference.py", line 208, in process_frames fps = 1/(time.time()-start) ZeroDivisionError: float division by zero 100%|██████████████████████████████████████████████████████████████████████████████████| 51/51 [00:07<00:00, 7.19it/s] ffmpeg -y -v fatal -r 25 -f image2 -i ./results/avatars/avator_1/tmp/%08d.png -vcodec libx264 -vf format=rgb24,scale=out_color_matrix=bt709,format=yuv420p -crf 18 ./results/avatars/avator_1/temp.mp4 ffmpeg -y -v fatal -i data/audio/yongen.wav -i ./results/avatars/avator_1/temp.mp4 ./results/avatars/avator_1/vid_output/audio_0.mp4 result is save to ./results/avatars/avator_1/vid_output/audio_0.mp4 Inferring using: data/audio/sun.wav video in 25 FPS, audio idx in 50FPS start inference 564 processing audio:data/audio/sun.wav costs 0.0ms 0%| | 0/141 [00:00<?, ?it/s]Generating the 0-th frame with FPS: 10.45 Exception in thread Thread-7 (process_frames): Traceback (most recent call last): File "D:\model\MuseTalk.glut\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "D:\model\MuseTalk.glut\lib\threading.py", line 953, in run self._target(self._args, **self._kwargs) File "D:\model\MuseTalk\scripts\realtime_inference.py", line 208, in process_frames fps = 1/(time.time()-start) ZeroDivisionError: float division by zero 100%|████████████████████████████████████████████████████████████████████████████████| 141/141 [00:13<00:00, 10.42it/s] ffmpeg -y -v fatal -r 25 -f image2 -i ./results/avatars/avator_1/tmp/%08d.png -vcodec libx264 -vf format=rgb24,scale=out_color_matrix=bt709,format=yuv420p -crf 18 ./results/avatars/avator_1/temp.mp4 ffmpeg -y -v fatal -i data/audio/sun.wav -i ./results/avatars/avator_1/temp.mp4 ./results/avatars/avator_1/vid_output/audio_1.mp4 result is save to ./results/avatars/avator_1/vid_output/audio_1.mp4