SadTalker icon indicating copy to clipboard operation
SadTalker copied to clipboard

生成到output目录报错

Open bjsongzhen opened this issue 1 year ago • 4 comments

'ffmpeg' �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ��� Traceback (most recent call last): File "shutil.py", line 815, in move FileNotFoundError: [WinError 2] 系统找不到指定的文件。: '66be9020-8387-4cf6-9fce-22968cef9fff.mp4' -> 'G:\novelai-webui-aki-v3\outputs\SadTalker\bdbaac7c-191d-44ec-bbb3-af6420f28536\tmpgauofhgl##chinese_poem1zxkhe625.mp4' 提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "G:\novelai-webui-aki-v3\py310\lib\site-packages\gradio\routes.py", line 337, in run_predict output = await app.get_blocks().process_api( File "G:\novelai-webui-aki-v3\py310\lib\site-packages\gradio\blocks.py", line 1015, in process_api result = await self.call_function( File "G:\novelai-webui-aki-v3\py310\lib\site-packages\gradio\blocks.py", line 833, in call_function prediction = await anyio.to_thread.run_sync( File "G:\novelai-webui-aki-v3\py310\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "G:\novelai-webui-aki-v3\py310\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "G:\novelai-webui-aki-v3\py310\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "G:\novelai-webui-aki-v3\modules\call_queue.py", line 15, in f res = func(*args, **kwargs) File "G:\novelai-webui-aki-v3/extensions/SadTalker\src\gradio_demo.py", line 122, in test return_path = self.animate_from_coeff.generate(data, save_dir, pic_path, crop_info, enhancer='gfpgan' if use_enhancer else None, preprocess=preprocess) File "G:\novelai-webui-aki-v3/extensions/SadTalker\src\facerender\animate.py", line 193, in generate save_video_with_watermark(path, new_audio_path, av_path, watermark= False) File "G:\novelai-webui-aki-v3/extensions/SadTalker\src\utils\videoio.py", line 26, in save_video_with_watermark shutil.move(temp_file, save_path) File "shutil.py", line 835, in move File "shutil.py", line 434, in copy2 File "shutil.py", line 254, in copyfile FileNotFoundError: [Errno 2] No such file or directory: '66be9020-8387-4cf6-9fce-22968cef9fff.mp4' 提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

bjsongzhen avatar Apr 16 '23 14:04 bjsongzhen

请确保ffmpeg正确安装,并且添加到路径,类似这个issues: https://github.com/Winfredy/SadTalker/issues/172

vinthony avatar Apr 16 '23 14:04 vinthony

多谢多谢,我再试一下

bjsongzhen avatar Apr 16 '23 15:04 bjsongzhen

我也遇到了一样的问题,并且尝试了安装ffmpeg并配置环境,这是ffmpeg版本ffmpeg version 6.0-full_build-www.gyan.dev。但是依然没用 Traceback (most recent call last): File "shutil.py", line 815, in move FileNotFoundError: [WinError 2] 系统找不到指定的文件。: '6ce16694-f4c7-4ceb-b708-44837e08d011.mp4' -> 'F:\ai\draw\novelai-webui-aki-v3\outputs\SadTalker\bf7d887e-5eb5-4a0c-939d-b5f7b1da8cc1\tmpopzk_6xe##nhayqcwgoy.mp4' 提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "F:\ai\draw\novelai-webui-aki-v3\py310\lib\site-packages\gradio\routes.py", line 337, in run_predict output = await app.get_blocks().process_api( File "F:\ai\draw\novelai-webui-aki-v3\py310\lib\site-packages\gradio\blocks.py", line 1015, in process_api result = await self.call_function( File "F:\ai\draw\novelai-webui-aki-v3\py310\lib\site-packages\gradio\blocks.py", line 833, in call_function prediction = await anyio.to_thread.run_sync( File "F:\ai\draw\novelai-webui-aki-v3\py310\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "F:\ai\draw\novelai-webui-aki-v3\py310\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "F:\ai\draw\novelai-webui-aki-v3\py310\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "F:\ai\draw\novelai-webui-aki-v3\modules\call_queue.py", line 15, in f res = func(*args, **kwargs) File "F:\ai\draw\novelai-webui-aki-v3/extensions/SadTalker\src\gradio_demo.py", line 122, in test return_path = self.animate_from_coeff.generate(data, save_dir, pic_path, crop_info, enhancer='gfpgan' if use_enhancer else None, preprocess=preprocess) File "F:\ai\draw\novelai-webui-aki-v3/extensions/SadTalker\src\facerender\animate.py", line 193, in generate save_video_with_watermark(path, new_audio_path, av_path, watermark= False) File "F:\ai\draw\novelai-webui-aki-v3/extensions/SadTalker\src\utils\videoio.py", line 26, in save_video_with_watermark shutil.move(temp_file, save_path) File "shutil.py", line 835, in move File "shutil.py", line 434, in copy2 File "shutil.py", line 254, in copyfile FileNotFoundError: [Errno 2] No such file or directory: '6ce16694-f4c7-4ceb-b708-44837e08d011.mp4'

lwstudy avatar Apr 17 '23 05:04 lwstudy

我也遇到了一样的问题,并且尝试了安装ffmpeg并配置环境,这是ffmpeg版本ffmpeg version 6.0-full_build-www.gyan.dev。但是依然没用 Traceback (most recent call last): File "shutil.py", line 815, in move FileNotFoundError: [WinError 2] 系统找不到指定的文件。: '6ce16694-f4c7-4ceb-b708-44837e08d011.mp4' -> 'F:\ai\draw\novelai-webui-aki-v3\outputs\SadTalker\bf7d887e-5eb5-4a0c-939d-b5f7b1da8cc1\tmpopzk_6xe##nhayqcwgoy.mp4' 提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "F:\ai\draw\novelai-webui-aki-v3\py310\lib\site-packages\gradio\routes.py", line 337, in run_predict output = await app.get_blocks().process_api( File "F:\ai\draw\novelai-webui-aki-v3\py310\lib\site-packages\gradio\blocks.py", line 1015, in process_api result = await self.call_function( File "F:\ai\draw\novelai-webui-aki-v3\py310\lib\site-packages\gradio\blocks.py", line 833, in call_function prediction = await anyio.to_thread.run_sync( File "F:\ai\draw\novelai-webui-aki-v3\py310\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "F:\ai\draw\novelai-webui-aki-v3\py310\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "F:\ai\draw\novelai-webui-aki-v3\py310\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "F:\ai\draw\novelai-webui-aki-v3\modules\call_queue.py", line 15, in f res = func(*args, **kwargs) File "F:\ai\draw\novelai-webui-aki-v3/extensions/SadTalker\src\gradio_demo.py", line 122, in test return_path = self.animate_from_coeff.generate(data, save_dir, pic_path, crop_info, enhancer='gfpgan' if use_enhancer else None, preprocess=preprocess) File "F:\ai\draw\novelai-webui-aki-v3/extensions/SadTalker\src\facerender\animate.py", line 193, in generate save_video_with_watermark(path, new_audio_path, av_path, watermark= False) File "F:\ai\draw\novelai-webui-aki-v3/extensions/SadTalker\src\utils\videoio.py", line 26, in save_video_with_watermark shutil.move(temp_file, save_path) File "shutil.py", line 835, in move File "shutil.py", line 434, in copy2 File "shutil.py", line 254, in copyfile FileNotFoundError: [Errno 2] No such file or directory: '6ce16694-f4c7-4ceb-b708-44837e08d011.mp4'

有完整的Traceback 吗

vinthony avatar Apr 17 '23 13:04 vinthony

To create a public link, set share=True in launch(). Startup time: 4.5s (load scripts: 1.0s, create ui: 1.2s, gradio launch: 2.3s). using safetensor as default {'checkpoint': 'D:\sd-webui-aki-v4\extensions\SadTalker\checkpoints\SadTalker_V0.0.2_512.safetensors', 'dir_of_BFM_fitting': 'D:\sd-webui-aki-v4/extensions/SadTalker/src/config', 'audio2pose_yaml_path': 'D:\sd-webui-aki-v4/extensions/SadTalker/src/config\auido2pose.yaml', 'audio2exp_yaml_path': 'D:\sd-webui-aki-v4/extensions/SadTalker/src/config\auido2exp.yaml', 'use_safetensor': True, 'mappingnet_checkpoint': 'D:\sd-webui-aki-v4\extensions\SadTalker\checkpoints\mapping_00109-model.pth.tar', 'facerender_yaml': 'D:\sd-webui-aki-v4/extensions/SadTalker/src/config\facerender_still.yaml'} C:\Users\boc\AppData\Local\Temp\gradio\4703a9c2429fc330d52154ded193618258b40423\tmp79wpj1by.png landmark Det:: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 7.93it/s] 3DMM Extraction In Video:: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 64.01it/s] mel:: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 665/665 [00:00<?, ?it/s] audio2exp:: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 67/67 [00:00<00:00, 280.89it/s] Face Renderer:: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 333/333 [08:10<00:00, 1.47s/it] The generated video is named ./results/df929fe8-c1ae-4aac-acf8-229b4a9ba1d9/tmp79wpj1by##配音文件-0-100.mp4 OpenCV: FFMPEG: tag 0x5634504d/'MP4V' is not supported with codec id 12 and format 'mp4 / MP4 (MPEG-4 Part 14)' OpenCV: FFMPEG: fallback to use tag 0x7634706d/'mp4v' seamlessClone:: 0%| | 0/665 [00:00<?, ?it/s] Traceback (most recent call last): File "D:\sd-webui-aki-v4\venv\lib\site-packages\gradio\routes.py", line 414, in run_predict output = await app.get_blocks().process_api( File "D:\sd-webui-aki-v4\venv\lib\site-packages\gradio\blocks.py", line 1323, in process_api result = await self.call_function( File "D:\sd-webui-aki-v4\venv\lib\site-packages\gradio\blocks.py", line 1051, in call_function prediction = await anyio.to_thread.run_sync( File "D:\sd-webui-aki-v4\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "D:\sd-webui-aki-v4\venv\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "D:\sd-webui-aki-v4\venv\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, *args) File "D:\sd-webui-aki-v4/extensions/SadTalker\src\gradio_demo.py", line 85, in test return_path = self.animate_from_coeff.generate(data, save_dir, pic_path, crop_info, enhancer='gfpgan' if use_enhancer else None, preprocess=preprocess, img_size=size) File "D:\sd-webui-aki-v4/extensions/SadTalker\src\facerender\animate.py", line 230, in generate paste_pic(path, pic_path, crop_info, new_audio_path, full_video_path, extended_crop= True if 'ext' in preprocess.lower() else False) File "D:\sd-webui-aki-v4/extensions/SadTalker\src\utils\paste_pic.py", line 63, in paste_pic gen_img = cv2.seamlessClone(p, full_img, mask, location, cv2.NORMAL_CLONE) cv2.error: OpenCV(4.7.0) D:\a\opencv-python\opencv-python\opencv\modules\core\src\matrix.cpp:809: error: (-215:Assertion failed) 0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows in function 'cv::Mat::Mat'

请教一下这是什么原因呢?如何解决

boc1982 avatar Jun 08 '23 05:06 boc1982

我也遇到同样的问题,刚开始试了几次是正常的,然后突然就报这个错误了,不知道什么原因

Feige-cn avatar Jun 08 '23 05:06 Feige-cn

可以修改/src/utils/paste_pic.py里的location变量 location= (min((ox1 + ox2 ) // 2, frame_w - (ox2 - ox1 ) // 2), min((oy1 + oy2) // 2, frame_h - (oy2 - oy1) // 2)) 虽然不会出bug,但一定程度会影响生成效果

gorgeousdays avatar Aug 15 '23 11:08 gorgeousdays