OpenTalker / SadTalker

[CVPR 2023] SadTalker:Learning Realistic 3D Motion Coefficients for Stylized Audio-Driven Single Image Talking Face Animation
https://sadtalker.github.io/
Other
11.65k stars 2.17k forks source link

EOFError: Ran out of input #658

Open MilesQLi opened 11 months ago

MilesQLi commented 11 months ago

After clicking Generate with the first example, I got the following error:

checkpoints\auido2pose_00140-model.pth Traceback (most recent call last): File "F:\Anaconda\envs\talker\lib\site-packages\gradio\routes.py", line 517, in predict output = await route_utils.call_process_api( File "F:\Anaconda\envs\talker\lib\site-packages\gradio\route_utils.py", line 216, in call_process_api output = await app.get_blocks().process_api( File "F:\Anaconda\envs\talker\lib\site-packages\gradio\blocks.py", line 1555, in process_api result = await self.call_function( File "F:\Anaconda\envs\talker\lib\site-packages\gradio\blocks.py", line 1193, in call_function prediction = await anyio.to_thread.run_sync( File "F:\Anaconda\envs\talker\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "F:\Anaconda\envs\talker\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "F:\Anaconda\envs\talker\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, args) File "F:\Anaconda\envs\talker\lib\site-packages\gradio\utils.py", line 654, in wrapper response = f(args, kwargs) File "F:\repos\Interactive-LLM-Powered-NPCs\SadTalker\src\gradio_demo.py", line 65, in test self.audio_to_coeff = Audio2Coeff(self.audio2pose_checkpoint, self.audio2pose_yaml_path, File "F:\repos\Interactive-LLM-Powered-NPCs\SadTalker\src\test_audio2coeff.py", line 35, in init self.audio2pose_model = Audio2Pose(cfg_pose, wav2lip_checkpoint, device=device) File "F:\repos\Interactive-LLM-Powered-NPCs\SadTalker\src\audio2pose_models\audio2pose.py", line 15, in init self.audio_encoder = AudioEncoder(wav2lip_checkpoint, device) File "F:\repos\Interactive-LLM-Powered-NPCs\SadTalker\src\audio2pose_models\audio_encoder.py", line 45, in init wav2lip_state_dict = torch.load(wav2lip_checkpoint, map_location=torch.device(device))['state_dict'] File "F:\Anaconda\envs\talker\lib\site-packages\torch\serialization.py", line 795, in load return _legacy_load(opened_file, map_location, pickle_module, pickle_load_args) File "F:\Anaconda\envs\talker\lib\site-packages\torch\serialization.py", line 1002, in _legacy_load magic_number = pickle_module.load(f, **pickle_load_args) EOFError: Ran out of input

nemoiee commented 11 months ago

To be honest, I have the same problem. Wait for solving it.

softmurata commented 9 months ago

Hey, I found the solution. Please rewrite scripts/download_model.sh like the following code

mkdir ./checkpoints  

# lagency download link
# wget -nc https://github.com/Winfredy/SadTalker/releases/download/v0.0.2/auido2exp_00300-model.pth -O ./checkpoints/auido2exp_00300-model.pth
# wget -nc https://github.com/Winfredy/SadTalker/releases/download/v0.0.2/auido2pose_00140-model.pth -O ./checkpoints/auido2pose_00140-model.pth
# wget -nc https://github.com/Winfredy/SadTalker/releases/download/v0.0.2/epoch_20.pth -O ./checkpoints/epoch_20.pth
# wget -nc https://github.com/Winfredy/SadTalker/releases/download/v0.0.2/facevid2vid_00189-model.pth.tar -O ./checkpoints/facevid2vid_00189-model.pth.tar
# wget -nc https://github.com/Winfredy/SadTalker/releases/download/v0.0.2/shape_predictor_68_face_landmarks.dat -O ./checkpoints/shape_predictor_68_face_landmarks.dat
# wget -nc https://github.com/Winfredy/SadTalker/releases/download/v0.0.2/wav2lip.pth -O ./checkpoints/wav2lip.pth
# wget -nc https://github.com/Winfredy/SadTalker/releases/download/v0.0.2/mapping_00229-model.pth.tar -O ./checkpoints/mapping_00229-model.pth.tar
# wget -nc https://github.com/Winfredy/SadTalker/releases/download/v0.0.2/mapping_00109-model.pth.tar -O ./checkpoints/mapping_00109-model.pth.tar
# wget -nc https://github.com/Winfredy/SadTalker/releases/download/v0.0.2/hub.zip -O ./checkpoints/hub.zip
# unzip -n ./checkpoints/hub.zip -d ./checkpoints/

#### download the new links.
wget -nc https://github.com/OpenTalker/SadTalker/releases/download/v0.0.2-rc/mapping_00109-model.pth.tar -P  ./checkpoints/
wget -nc https://github.com/OpenTalker/SadTalker/releases/download/v0.0.2-rc/mapping_00229-model.pth.tar -P  ./checkpoints/
wget -nc https://github.com/OpenTalker/SadTalker/releases/download/v0.0.2-rc/SadTalker_V0.0.2_256.safetensors -O  ./checkpoints/SadTalker_V0.0.2_256.safetensors
wget -nc https://github.com/OpenTalker/SadTalker/releases/download/v0.0.2-rc/SadTalker_V0.0.2_512.safetensors -O  ./checkpoints/SadTalker_V0.0.2_512.safetensors

# wget -nc https://github.com/Winfredy/SadTalker/releases/download/v0.0.2/BFM_Fitting.zip -O ./checkpoints/BFM_Fitting.zip
# unzip -n ./checkpoints/BFM_Fitting.zip -d ./checkpoints/

### enhancer 
mkdir -p ./gfpgan/weights
wget -nc https://github.com/xinntao/facexlib/releases/download/v0.1.0/alignment_WFLW_4HG.pth -O ./gfpgan/weights/alignment_WFLW_4HG.pth 
wget -nc https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth -O ./gfpgan/weights/detection_Resnet50_Final.pth 
wget -nc https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.4.pth -O ./gfpgan/weights/GFPGANv1.4.pth 
wget -nc https://github.com/xinntao/facexlib/releases/download/v0.2.2/parsing_parsenet.pth -O ./gfpgan/weights/parsing_parsenet.pth 

maybe, mapping**.pth.tar files destroyed...