Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webUi推理失败,未找到audio2pose_checkpoint #493

Open
HaSaKiYasuooo opened this issue Jul 11, 2023 · 9 comments
Open

webUi推理失败,未找到audio2pose_checkpoint #493

HaSaKiYasuooo opened this issue Jul 11, 2023 · 9 comments

Comments

@HaSaKiYasuooo
Copy link

image
如何解决这个问题

@ytnurg
Copy link

ytnurg commented Jul 20, 2023

had the same issue any solutions? running on amd

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': '"C:\Users\Ghost\stable-diffusion-webui\extensions\SadTalker\checkpoints"\wav2lip.pth', 'audio2pose_checkpoint': '"C:\Users\Ghost\stable-diffusion-webui\extensions\SadTalker\checkpoints"\auido2pose_00140-model.pth', 'audio2exp_checkpoint': '"C:\Users\Ghost\stable-diffusion-webui\extensions\SadTalker\checkpoints"\auido2exp_00300-model.pth', 'free_view_checkpoint': '"C:\Users\Ghost\stable-diffusion-webui\extensions\SadTalker\checkpoints"\facevid2vid_00189-model.pth.tar', 'path_of_net_recon_model': '"C:\Users\Ghost\stable-diffusion-webui\extensions\SadTalker\checkpoints"\epoch_20.pth', 'dir_of_BFM_fitting': 'C:\Users\Ghost\stable-diffusion-webui/extensions/SadTalker/src/config', 'audio2pose_yaml_path': 'C:\Users\Ghost\stable-diffusion-webui/extensions/SadTalker/src/config\auido2pose.yaml', 'audio2exp_yaml_path': 'C:\Users\Ghost\stable-diffusion-webui/extensions/SadTalker/src/config\auido2exp.yaml', 'use_safetensor': False, 'mappingnet_checkpoint': '"C:\Users\Ghost\stable-diffusion-webui\extensions\SadTalker\checkpoints"\mapping_00109-model.pth.tar', 'facerender_yaml': 'C:\Users\Ghost\stable-diffusion-webui/extensions/SadTalker/src/config\facerender_still.yaml'}
Traceback (most recent call last):
File "C:\Users\Ghost\stable-diffusion-webui/extensions/SadTalker\src\test_audio2coeff.py", line 48, in init
load_cpk(sadtalker_path['audio2pose_checkpoint'], model=self.audio2pose_model, device=device)
File "C:\Users\Ghost\stable-diffusion-webui/extensions/SadTalker\src\test_audio2coeff.py", line 17, in load_cpk
checkpoint = torch.load(checkpoint_path, map_location=torch.device(device))
File "C:\Users\Ghost\stable-diffusion-webui\modules\safe.py", line 108, in load
return load_with_extra(filename, *args, extra_handler=global_extra_handler, **kwargs)
File "C:\Users\Ghost\stable-diffusion-webui\modules\safe.py", line 156, in load_with_extra
return unsafe_torch_load(filename, *args, **kwargs)
File "C:\Users\Ghost\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 791, in load
with _open_file_like(f, 'rb') as opened_file:
File "C:\Users\Ghost\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 271, in _open_file_like
return _open_file(name_or_buffer, mode)
File "C:\Users\Ghost\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 252, in init
super().init(open(name, mode))
OSError: [Errno 22] Invalid argument: '"C:\Users\Ghost\stable-diffusion-webui\extensions\SadTalker\checkpoints"\auido2pose_00140-model.pth'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Ghost\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 422, in run_predict
output = await app.get_blocks().process_api(
File "C:\Users\Ghost\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1323, in process_api
result = await self.call_function(
File "C:\Users\Ghost\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1051, in call_function
prediction = await anyio.to_thread.run_sync(
File "C:\Users\Ghost\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "C:\Users\Ghost\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "C:\Users\Ghost\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "C:\Users\Ghost\stable-diffusion-webui\modules\call_queue.py", line 13, in f
res = func(*args, **kwargs)
File "C:\Users\Ghost\stable-diffusion-webui/extensions/SadTalker\src\gradio_demo.py", line 49, in test
self.audio_to_coeff = Audio2Coeff(self.sadtalker_paths, self.device)
File "C:\Users\Ghost\stable-diffusion-webui/extensions/SadTalker\src\test_audio2coeff.py", line 50, in init
raise Exception("Failed in loading audio2pose_checkpoint")
Exception: Failed in loading audio2pose_checkpoint

also it appears that some of the "" are "/" backwards how would i go about fixing this?

@LianShuaiLong
Copy link

up up

@LianShuaiLong
Copy link

same error
To be honestly,

@ytnurg
Copy link

ytnurg commented Jul 25, 2023

set my batch file up like this on windows by rightclicking and editing for those that dont understand... so far the script is running/loading and operating as it should will post success if i develop a successful video. looks like an update has been made!

@echo off
set PYTHON="C:\Users\Ghost\AppData\Local\Programs\Python\Python310\python.exe"
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=--precision full --no-half --skip-torch-cuda-test --disable-safe-unpickle
set SADTALKER_CHECKPOINTS=C:\Users\Ghost\stable-diffusion-webui\extensions\SadTalker\checkpoints
git pull
call webui.bat

edit - all works as it should on my end using an amd cpu, best of luck!

@hyqshr
Copy link

hyqshr commented Aug 9, 2023

I ran to the same issue on windows. All model that I downloaded in `./checkpoints/' have some weird character at the end which is invisible in file explorer.

Click rename the file and delete that character if there is a space at the end. This solve my issue

@danyow-cheung
Copy link

I found out the error source is the src/utils/init_path.py In this code,seem like we need to find different models to download ,

def init_path(checkpoint_dir, config_dir, size=512, old_version=False, preprocess='crop'):

    if old_version:
        #### load all the checkpoint of `pth`
        # gradio_demo里面调用的是这个
        sadtalker_paths = {
                'wav2lip_checkpoint' : os.path.join(checkpoint_dir, 'wav2lip.pth'),
                'audio2pose_checkpoint' : os.path.join(checkpoint_dir, 'auido2pose_00140-model.pth'),
                'audio2exp_checkpoint' : os.path.join(checkpoint_dir, 'auido2exp_00300-model.pth'),
                'free_view_checkpoint' : os.path.join(checkpoint_dir, 'facevid2vid_00189-model.pth.tar'),
                'path_of_net_recon_model' : os.path.join(checkpoint_dir, 'epoch_20.pth')
        }


Including wav2lip ,audio2pose,audio2exp_checkpoint, This repo doesn't have it ?

@danyow-cheung
Copy link

found it 😂 #132

@donglsci
Copy link

fail loading checkpoint, so you need check if you had these checkpoint files, they are located at the directory such as "xxx\stable-diffusion-webui-master\webui\extensions\SadTalker\checkpoints". if not, you can dowload them all at the github "https://github.com/OpenTalker/SadTalker/releases/"

@tomihbk
Copy link

tomihbk commented Nov 26, 2023

set my batch file up like this on windows by rightclicking and editing for those that dont understand... so far the script is running/loading and operating as it should will post success if i develop a successful video. looks like an update has been made!

@echo off set PYTHON="C:\Users\Ghost\AppData\Local\Programs\Python\Python310\python.exe" set GIT= set VENV_DIR= set COMMANDLINE_ARGS=--precision full --no-half --skip-torch-cuda-test --disable-safe-unpickle set SADTALKER_CHECKPOINTS=C:\Users\Ghost\stable-diffusion-webui\extensions\SadTalker\checkpoints git pull call webui.bat

edit - all works as it should on my end using an amd cpu, best of luck!

@ytnurg I have to respectfully disagree with your commandline args, cuda test should not be skipped. By doing that, you're only using your CPU and not GPU which is very efficient and fast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants