Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid loadkey #80

Open
sarique2003 opened this issue Jul 10, 2023 · 3 comments
Open

Invalid loadkey #80

sarique2003 opened this issue Jul 10, 2023 · 3 comments

Comments

@sarique2003
Copy link

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
Copy link

@sarique2003 how did you resolved this issue?

@sarique2003
Copy link
Author

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.

@sarique2003 sarique2003 reopened this Jul 12, 2023
@akarce
Copy link

akarce commented Jul 26, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants