One-Shot_Free-View_Neural_Talking_Head_Synthesis icon indicating copy to clipboard operation
One-Shot_Free-View_Neural_Talking_Head_Synthesis copied to clipboard

pickle.UnpicklingError when train

Open wl0521 opened this issue 3 years ago • 2 comments

Good Day, Zhang: I encount a problem when training:

My conda env: torch == 1.7.1+cu110 torchvision == 0.8.2+cu110 pytorch3d == 0.6.1 python == 3.8

The Excption Information as below:

File "OneShot/run.py", line 92, in train(config, generator, discriminator, kp_detector, he_estimator, opt.checkpoint, log_dir, dataset, opt.device_ids) File "/home/theonemagic/Downloads/U_PycharmProjects/pytorch3d_root/OneShot/train.py", line 43, in train generator_full = GeneratorFullModel(kp_detector, he_estimator, generator, discriminator, train_params, estimate_jacobian=config['model_params']['common_params']['estimate_jacobian']) File "/home/theonemagic/Downloads/U_PycharmProjects/pytorch3d_root/OneShot/modules/model.py", line 257, in init hopenet_state_dict = torch.load(train_params['hopenet_snapshot']) File "/home/theonemagic/anaconda3/envs/python3d/lib/python3.8/site-packages/torch/serialization.py", line 595, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "/home/theonemagic/anaconda3/envs/python3d/lib/python3.8/site-packages/torch/serialization.py", line 764, in _legacy_load magic_number = pickle_module.load(f, **pickle_load_args) _pickle.UnpicklingError: A load persistent id instruction was encountered, but no persistent_load function was specified.

I do not know how to solve, waiting for your assistance and thanks in advance.

wl0521 avatar Jan 24 '22 18:01 wl0521

@wl0521 Have you downloaded hopenet_robust_alpha1.pkl and added the path to the config? Make sure that hopenet_snapshot in vox.yaml is correct.

zhanglonghao1992 avatar Jan 25 '22 07:01 zhanglonghao1992

yes ,this step is omitted, thanks, i will try later

wl0521 avatar Jan 26 '22 00:01 wl0521