Closed bostjan39 closed 3 years ago
duplicate of https://github.com/Rudrabha/Wav2Lip/issues/142?
Didn't see that issue, sorry. But how to check, if the checkpoint file is corrupted? I only downloaded it from the provided link, I know nothing about how to check it and what to check for (yup, a n00b). Thanks:)
Re-download it once more and check again? The size should be 416 MB
s3fd pth file has around 80MB, or am I missing something? Thanks!
I think the error is coming when loading the Wav2lip checkpoint.
I am also getting this error. I've tried to download the checkpoint file from both links in the readme, but it has failed with both. Both are around 85MB
I think the error is coming when loading the Wav2lip checkpoint.
Please check if it is this. Please paste the complete log here
Traceback (most recent call last): File "inference.py", line 279, in
main() File "inference.py", line 251, in main model = load_model(args.checkpoint_path) File "inference.py", line 171, in load_model s = checkpoint["state_dict"] KeyError: 'state_dict'
This is how it looks like for me. Seems like it is the model
Exactly my error too:)
Yes, it is the Wav2Lip model.
What is the size of the downloaded checkpoint? And what is the command you are running? Can you paste that as well?
The size is 87MB. Cmd is: python inference.py --checkpoint_path face_detection/detection/sfd/s3fd.pth --face myfiles/myvideo.mp4 --audio myfiles/myaudio.wav
Thanks!
You are specifying the wrong checkpoint path. Please pass the Wav2lip checkpoint path for the argument --checkpoint_path
python inference.py --checkpoint_path checkpoints/s3fd.pth --face test.mp4 --audio test.mp3
This is the command I am using that throws this 'state_dict' error. Omitting the path throws a different error. Both links to the checkpoint paths in the readme give ~85MB files
Please download the Wav2Lip checkpoint (you are downloading the face detection checkpoint) and pass that for the --checkpoint_path
argument.
Ok, so I've tried by downloading the Wav2Lip with Gan package and put it into the checkpoints folder. Then I ran this: python inference.py --checkpoint_path checkpoints/wav2lip_gan.pth ... and although it went through, it didn't produce the result because of the missing ffmpeg module, which is another story. Did anyone had any luck finding and installing the ffmpeg module for py3?
Thanks!
@bostjan39 You do not need to install ffmpeg on python3. You need it on your machine level so the command "ffmpeg" is available.
Hi, just did it and it works like a charm. Thanks!
Hi,
When running the script, right after s3fd pth file is loaded, it throws a KeyError: state_dict in load_model "s=checkpoint [state_dict]".
How to fix this?
Thanks!