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.99k stars 2.24k forks source link

TypeError: 'NoneType' object is not subscriptable #237

Open MetAIvisuals opened 1 year ago

MetAIvisuals commented 1 year ago

Traceback (most recent call last): File "G:\Programme\STABLE DIFFUSION\venv\lib\site-packages\gradio\routes.py", line 394, in run_predict output = await app.get_blocks().process_api( File "G:\Programme\STABLE DIFFUSION\venv\lib\site-packages\gradio\blocks.py", line 1075, in process_api result = await self.call_function( File "G:\Programme\STABLE DIFFUSION\venv\lib\site-packages\gradio\blocks.py", line 884, in call_function prediction = await anyio.to_thread.run_sync( File "G:\Programme\STABLE DIFFUSION\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "G:\Programme\STABLE DIFFUSION\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "G:\Programme\STABLE DIFFUSION\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, args) File "G:\Programme\STABLE DIFFUSION\modules\call_queue.py", line 15, in f res = func(args, **kwargs) File "G:\Programme\STABLE DIFFUSION/extensions/SadTalker\src\gradio_demo.py", line 65, in test self.audio_to_coeff = Audio2Coeff(self.audio2pose_checkpoint, self.audio2pose_yaml_path, File "G:\Programme\STABLE DIFFUSION/extensions/SadTalker\src\test_audio2coeff.py", line 35, in init self.audio2pose_model = Audio2Pose(cfg_pose, wav2lip_checkpoint, device=device) File "G:\Programme\STABLE DIFFUSION/extensions/SadTalker\src\audio2pose_models\audio2pose.py", line 15, in init self.audio_encoder = AudioEncoder(wav2lip_checkpoint, device) File "G:\Programme\STABLE DIFFUSION/extensions/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'] TypeError: 'NoneType' object is not subscriptable

AlonDan commented 1 year ago

Try another image, I get this error when the face is either too big (close up) or in an angle that is more than 20-30 degrees.

Based on my personal tests, It seems like SadTalker is less forgiving on recognizing and accept face unlike other projects such as SimSwap and Wav2Lip for example. I hope that in the future it will have a better one for recognize a face in any angle or size. Maybe even multiple-faces at one per process (like Wav2Lip for example).

Until this will be improved, just try another image if you get this error, I hope it helps.

MetAIvisuals commented 1 year ago

Hm, I treid that, but its not working still

vinthony commented 1 year ago

redownload the checkpoint of wav2lip.pth