ganspace
ganspace copied to clipboard
Google colab - When running cell to convert tensorflow model to pytorch model, I get an error
Traceback (most recent call last):
File "/content/ganspace/models/stylegan2/stylegan2-pytorch/convert_weight.py", line 221, in <module>
generator, discriminator, g_ema = pickle.load(f)
File "/content/stylegan2/dnnlib/tflib/network.py", line 278, in __setstate__
assert state["version"] in [2, 3, 4]
AssertionError
This is the error I am getting. Any help?
Are you using a model from Stylgan2-Ada? I have at some point got that error while using google colab, but the solution was nothing to do with colab.
Are you using a model from Stylgan2-Ada? I have at some point got that error while using google colab, but the solution was nothing to do with colab.
Sorry that I am late. Yes, I am using a Stylegan2-Ada model.
What params and functions are you using? I was able to get my Stylegan2-ada model to work using the advice of https://github.com/harskish/ganspace/issues/21 Have you tried that?
What params and functions are you using? I was able to get my Stylegan2-ada model to work using the advice of #21 Have you tried that?
I left it all at default and when running the cell "!python /content/ganspace/models/stylegan2/stylegan2-pytorch/convert_weight.py --repo="/content/stylegan2/" "/content/ffhq.pkl" #convert weights"
What params and functions are you using? I was able to get my Stylegan2-ada model to work using the advice of #21 Have you tried that?
Hi, I have checked out the issue and it did not solve anything, I still can't convert my model and I still get this error

Please try the advice suggested in https://github.com/harskish/ganspace/issues/21
python /content/ganspace/models/stylegan2/stylegan2-pytorch/convert_weight.py --repo="path/to/the/stylegan2-ada/repo" "tensorflow_pkl"
Have you tried that?
Please try the advice suggested in #21
python /content/ganspace/models/stylegan2/stylegan2-pytorch/convert_weight.py --repo="path/to/the/stylegan2-ada/repo" "tensorflow_pkl"Have you tried that?
I have multiple times but I think I found the problem. My model is Stylegan2-ada, but I am using the Stylegan2 model converter. I think that might me the problem. Is there any way I can do this using the Stylegan2 model converter or is there any model converter that does convert stylegan2-ada succesfully?
Thanks!
Please try the advice suggested in #21
python /content/ganspace/models/stylegan2/stylegan2-pytorch/convert_weight.py --repo="path/to/the/stylegan2-ada/repo" "tensorflow_pkl"Have you tried that?I have multiple times but I think I found the problem. My model is Stylegan2-ada, but I am using the Stylegan2 model converter. I think that might me the problem. Is there any way I can do this using the Stylegan2 model converter or is there any model converter that does convert stylegan2-ada succesfully?
Thanks!
Oh and not to forget, I did find a Stylegan2-ada-pytorch repo but it doesn't convert weights