zhanglonghao1992 / One-Shot_Free-View_Neural_Talking_Head_Synthesis

Pytorch implementation of paper "One-Shot Free-View Neural Talking-Head Synthesis for Video Conferencing"
Other
735 stars 141 forks source link

Execution encountered error #34

Open leos-code opened 2 years ago

leos-code commented 2 years ago

python demo.py --config checkpoint/TalkingHead/vox-256.yaml --checkpoint ./00000189-checkpoint.pth.tar --source_image asset/source/0.png --driving_video asset/driving/0.mp4 --relative --adapt_scale --find_best_frame --cpu Traceback (most recent call last): File "demo.py", line 287, in generator, kp_detector, he_estimator = load_checkpoints(config_path=opt.config, checkpoint_path=opt.checkpoint, gen=opt.gen, cpu=opt.cpu) File "demo.py", line 56, in load_checkpoints kp_detector.load_state_dict(checkpoint['kp_detector']) File "/root/.conda/envs/py38/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for KPDetector: Unexpected key(s) in state_dict: "down.weight".

zhanglonghao1992 commented 2 years ago

@huarong8 Be sure to use vox-256-spade.yaml. However, it seems that this error is not caused by the wrong config file. It seems that there are some weights in the checkpoint that do not match the model. Make sure you are using the latest version of the code.