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 converting .pkl to .pt file #9

Open
zjgt opened this issue Aug 19, 2021 · 0 comments
Open

error converting .pkl to .pt file #9

zjgt opened this issue Aug 19, 2021 · 0 comments

Comments

@zjgt
Copy link

zjgt commented Aug 19, 2021

Thanks for sharing Convert_pkl_to_pt.ipynb. I do not have a problem with the model provided when run in google colab, but encounter an issue when using my own custom model. My custom model is trained with 512x512 images with stylegan2-ada-pytorch with all default settings.

Traceback (most recent call last):
File "/content/stylegan2-pytorch/convert_weight.py", line 236, in
generator, discriminator, g_ema = pickle.load(f)
ModuleNotFoundError: No module named 'torch_utils'

After I pip install torch_utils, I got the following message:
Traceback (most recent call last):
File "/content/stylegan2-pytorch/closed_form_factorization.py", line 18, in
ckpt = torch.load(args.ckpt)
File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 608, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 777, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
ModuleNotFoundError: No module named 'torch_utils.persistence'

What should I do?

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