yoyo-nb / Thin-Plate-Spline-Motion-Model

[CVPR 2022] Thin-Plate Spline Motion Model for Image Animation.
MIT License
3.38k stars 552 forks source link

Invalid loadkey #80

Open sarique2003 opened 12 months ago

sarique2003 commented 12 months ago

Hey, i know that recently some changes were made to the repository.I was working on a project which was fine before now i am facing this error:


UnpicklingError Traceback (most recent call last)

in <cell line: 2>() 1 from demo import load_checkpoints ----> 2 inpainting, kp_detector, dense_motion_network, avd_network = load_checkpoints(config_path = config_path, checkpoint_path = checkpoint_path, device = device)

2 frames

/content/Thin-Plate-Spline-Motion-Model/demo.py in load_checkpoints(config_path, checkpoint_path, device) 49 avd_network.to(device) 50 ---> 51 checkpoint = torch.load(checkpoint_path, map_location=device) 52 53 inpainting.load_state_dict(checkpoint['inpainting_network'])

/usr/local/lib/python3.10/dist-packages/torch/serialization.py in load(f, map_location, pickle_module, weights_only, pickle_load_args) 813 except RuntimeError as e: 814 raise pickle.UnpicklingError(UNSAFE_MESSAGE + str(e)) from None --> 815 return _legacy_load(opened_file, map_location, pickle_module, pickle_load_args) 816 817

/usr/local/lib/python3.10/dist-packages/torch/serialization.py in _legacy_load(f, map_location, pickle_module, pickle_load_args) 1031 "functionality.") 1032 -> 1033 magic_number = pickle_module.load(f, pickle_load_args) 1034 if magic_number != MAGIC_NUMBER: 1035 raise RuntimeError("Invalid magic number; corrupt file?")

UnpicklingError: invalid load key, '<'.

lokesh005 commented 12 months ago

@sarique2003 how did you resolved this issue?

sarique2003 commented 12 months ago

Well i changed the path connecting command to: !mkdir checkpoints !pip3 install wldhx.yadisk-direct !curl -L $(yadisk-direct https://disk.yandex.com/d/i08z-kCuDGLuYA) -o checkpoints/vox.pth.tar

and it worked once but after that i am still getting the same issue again.

akarce commented 11 months ago

I'm having the same issue, is there anyone could resolve this