stylegan2-pytorch icon indicating copy to clipboard operation
stylegan2-pytorch copied to clipboard

assert state["version"] in [2, 3]

Open Lvhhhh opened this issue 4 years ago • 4 comments

when i run convert_weight.py --repo /media/31_sdf/stylegan2/ /media/31_sdf/stylegan2/pretrained_models/stylegan2-ffhq-config-f.pkl check the path is right and pkl is download from https://github.com/NVlabs/stylegan2 https://drive.google.com/drive/folders/1yanUI9m4b4PWzR0eurKNq6JR1Bbfbh6L

the error is : Traceback (most recent call last): File "/media/31_sdf/stylegan2/convert_weight.py", line 227, in generator, discriminator, g_ema = pickle.load(f) File "/usr/local/lib/python3.6/dist-packages/dnnlib/tflib/network.py", line 279, in setstate assert state["version"] in [2, 3]

Lvhhhh avatar Mar 12 '21 01:03 Lvhhhh

I think maybe version of the code that created pickle is different from repository you set.

rosinality avatar Mar 27 '21 00:03 rosinality

same issue here. i trained a model based off the original stylegan2 repo.

nanlliu avatar Feb 14 '22 06:02 nanlliu

I made the same mistake delete it...it works momently : )

lijiae avatar Mar 08 '22 17:03 lijiae

Maybe I found this solution!

the usage of "--repo stylegan2" is using the dnnlib in stylegan2, maybe u have installed the dnnlib by pip, so u should uninstall and try again

MarkZXZX avatar Jun 25 '22 10:06 MarkZXZX