harskish / ganspace

Discovering Interpretable GAN Controls [NeurIPS 2020]
Apache License 2.0
1.78k stars 264 forks source link

Error to load model after .pkl. to .pt conversion of StyleGAN2 model - zip archive #56

Closed d-t-n closed 2 years ago

d-t-n commented 2 years ago

Hi, Following the recommended conversion from .pkl to .pt of a StyleGAN2 model , adding the file to the checkpoints folder and editing wrappers.py, got the following error when loading the model:

"line 599, in _load

raise RuntimeError("{} is a zip archive (did you mean to use torch.jit.load()?)".format([f.name](http://f.name/)))

RuntimeError: C:\ML\Projects\ganspace\models\checkpoints\stylegan2[stylegan2_new_1024.pt](http://stylegan2_new_1024.pt/) is a zip archive (did you mean to use torch.jit.load()?) "

Have anyone seen this issue before? Thanks

d-t-n commented 2 years ago

Verified that I used the rosinalitybranch of StyleGAN2 instead of the harskish/ one. Now it is loading the model.