Closed yyy7124 closed 2 years ago
And how to generate GAN inversion images
It seems like you changed the set_encoder
function in psp.py
, resulting in the error. Is there a reason that you added that if
statement? You are trying to load a pretrained SAM model with opts
that do not contain the encoder_type
field. That is why your code fails.
Regarding your question on how to generate GAN inversion images, you can simply use the pSp repo if you would like. SAM is designed to edit age, not perform GAN inversion.
Thanks for your prompt reply . I added the if statement for the convenience of choosing Gradualstyleencoder or Backboneencoder like in psp.Would it work if I used the weights I trained myself? I see that the image shown in your paper is a GAN inversion, which is a little different from the image in the FFHQ dataset. Why doesn't this difference need to be used as a measure?
I see that the image shown in your paper is a GAN inversion, which is a little different from the image in the FFHQ dataset.
We showed the inverted image instead of the original FFHQ/CelebA-HQ image due to licensing reasons.
Would it work if I used the weights I trained myself?
The code provided in the repo is used to reproduce the paper as is. If you would like to make alterations to the inner workings of SAM, you will need to alter the code. So yes, if you trained our own model, you can load them, but this will require you to know how to alter the code to get what you want.
Hello, thank you for sharing. I added the encoder_type parameter like psp, but I got this problem when running inference.py