DinoMan / speech-driven-animation

949 stars 289 forks source link

Problem loading checkpoint : _pickle.UnpicklingError: invalid load key, 'v'. #37

Closed avisekiit closed 4 years ago

avisekiit commented 4 years ago

Dear Authors,

Thanks for open-sourcing your project. I was just trying to load one of your pre-trained models on GRID. So, I downloaded the .dat file from Google Drive onto my Windows system and then transferred to my CentOs server via WinSCP. Python = 3.6.9 (Anaconda) Pytorch = 1.4.0 Is there any suggested way to use the .dat files? Thanks, Following is the error:

Loading from: /home/avisek/speech-driven-animation/sda/data/grid.dat Traceback (most recent call last): File "demo.py", line 2, in <module> va = sda.VideoAnimator(gpu=0)# Instantiate the animator File "/home/avisek/speech-driven-animation/sda/sda.py", line 110, in __init__ model_dict = torch.load(model_path, map_location=lambda storage, loc: storage.cuda(gpu)) File "/home/avisek/anaconda3/envs/ijcv_2019_lip_readinig/lib/python3.6/site-packages/torch/serialization.py", line 529, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "/home/avisek/anaconda3/envs/ijcv_2019_lip_readinig/lib/python3.6/site-packages/torch/serialization.py", line 692, in _legacy_load magic_number = pickle_module.load(f, **pickle_load_args) _pickle.UnpicklingError: invalid load key, 'v'.

sicilyliulc commented 4 years ago

i have the same error,can u solve it?

ulen2000 commented 1 year ago

try to point to the path of the model. va = sda.VideoAnimator(gpu=0, model_path="/path/to/crema.dat")

work for me