安装了v0.02 - rc,能正常打开web UI,但是添加图片和音频后,运行时报错,请问该怎么处理?
WARNING: The new version of the model will be updated by safetensor, you may need to download it mannully. We run the old version of the checkpoint this time! {'wav2lip_checkpoint': 'checkpoints\wav2lip.pth', 'audio2pose_checkpoint': 'checkpoints\auido2pose_00140-model.pth', 'audio2exp_checkpoint': 'checkpoints\auido2exp_00300-model.pth', 'free_view_checkpoint': 'checkpoints\facevid2vid_00189-model.pth.tar', 'path_of_net_recon_model': 'checkpoints\epoch_20.pth', 'dir_of_BFM_fitting': 'src/config', 'audio2pose_yaml_path': 'src/config\auido2pose.yaml', 'audio2exp_yaml_path': 'src/config\auido2exp.yaml', 'use_safetensor': False, 'mappingnet_checkpoint': 'checkpoints\mapping_00229-model.pth.tar', 'facerender_yaml': 'src/config\facerender.yaml'} Traceback (most recent call last): File "D:\SadTalker\src\test_audio2coeff.py", line 48, in init load_cpk(sadtalker_path['audio2pose_checkpoint'], model=self.audio2pose_model, device=device) File "D:\SadTalker\src\test_audio2coeff.py", line 17, in load_cpk checkpoint = torch.load(checkpoint_path, map_location=torch.device(device)) File "D:\SadTalker\venv\lib\site-packages\torch\serialization.py", line 699, in load with _open_file_like(f, 'rb') as opened_file: File "D:\SadTalker\venv\lib\site-packages\torch\serialization.py", line 230, in _open_file_like return _open_file(name_or_buffer, mode) File "D:\SadTalker\venv\lib\site-packages\torch\serialization.py", line 211, in init super(_open_file, self).init(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: 'checkpoints\auido2pose_00140-model.pth'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "D:\SadTalker\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict output = await app.get_blocks().process_api( File "D:\SadTalker\venv\lib\site-packages\gradio\blocks.py", line 1431, in process_api result = await self.call_function( File "D:\SadTalker\venv\lib\site-packages\gradio\blocks.py", line 1109, in call_function prediction = await anyio.to_thread.run_sync( File "D:\SadTalker\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "D:\SadTalker\venv\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "D:\SadTalker\venv\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, *args) File "D:\SadTalker\venv\lib\site-packages\gradio\utils.py", line 706, in wrapper response = f(*args, **kwargs) File "D:\SadTalker\src\gradio_demo.py", line 49, in test self.audio_to_coeff = Audio2Coeff(self.sadtalker_paths, self.device) File "D:\SadTalker\src\test_audio2coeff.py", line 50, in init raise Exception("Failed in loading audio2pose_checkpoint") Exception: Failed in loading audio2pose_checkpoint
同问,检查发现checkpoints\auido2pose_00140-model.pth存在
app_sadtalker.py中(默认的checkpoints不在系统路径中) def sadtalker_demo(checkpoint_path='scripts/checkpoints', config_path='src/config', warpfn=None):
看看模型文件是不是没下载完成,有可能下了一半,文件存在了,但是不完整,可以用下载软件把模型下载下来放到目录里去
同问,检查发现checkpoints\auido2pose_00140-model.pth存在
我下载的model 就没有是什么回事
app_sadtalker.py中(默认的checkpoints不在系统路径中) def sadtalker_demo(checkpoint_path='scripts/checkpoints', config_path='src/config', warpfn=None):def sadtalker_demo(checkpoint_path='scripts/checkpoints', config_path='src/config', warpfn=None):
检查一下创建的文件夹名称“checkpoints"是否有写错,之前我少打了最一个字母“S”,就会报错,后来改完后就正常运行了。
fixed:https://github.com/OpenTalker/SadTalker/issues/410#issuecomment-1869201304
我是从百度网盘下载的,模型文件名称不对,多了一个类似空格,重命名一下就好了