genforce / mganprior

[CVPR 2020] Image Processing Using Multi-Code GAN Prior
https://genforce.github.io/mganprior/
288 stars 44 forks source link

hello, there may be a bug for stylegan. #2

Open wxxxxxxh opened 4 years ago

wxxxxxxh commented 4 years ago

Thanks for your great work in GAN inversion. I find a bug when I set the generator_type as stylegan. I guess that line 69 in derivable_generator.py should be self.stylegan = get_gan_model(gan_model_name)
and line 80 should be self.stylegan.net.cuda(device=device), otherwise, it may cause an error like this: AttributeError: 'StyleGANGeneratorNet' object has no attribute 'net'.

berylsheep-up commented 4 years ago

Thanks for advice!

YAyaXM commented 4 years ago

AttributeError: 'StyleGAN2GeneratorNet' object has no attribute 'net'

I've had this problem

YAyaXM commented 4 years ago

Could you give us some answers @JasonGUTU

YingqingHe commented 3 years ago

I also met this problem, thanks so much for your advice!