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

Error on notebook #99

Open
MsM512 opened this issue Mar 5, 2024 · 0 comments
Open

Error on notebook #99

MsM512 opened this issue Mar 5, 2024 · 0 comments

Comments

@MsM512
Copy link

MsM512 commented Mar 5, 2024

Hi,
On loading pre-trained model,I got this error on Colab:


UnpicklingError Traceback (most recent call last)
in <cell line: 13>()
11 generator = DualStyleGAN(1024, 512, 8, 2, res_index=6)
12 generator.eval()
---> 13 ckpt = torch.load(os.path.join(MODEL_DIR, style_type, 'generator.pt'), map_location=lambda storage, loc: storage)
14 generator.load_state_dict(ckpt["g_ema"])
15 generator = generator.to(device)

1 frames
/usr/local/lib/python3.10/dist-packages/torch/serialization.py in _legacy_load(f, map_location, pickle_module, **pickle_load_args)
1244 "functionality.")
1245
-> 1246 magic_number = pickle_module.load(f, **pickle_load_args)
1247 if magic_number != MAGIC_NUMBER:
1248 raise RuntimeError("Invalid magic number; corrupt file?")

UnpicklingError: invalid load key, '<'.

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

1 participant