Open pbizimis opened 3 years ago
Since StyleGan2-ADA-PyTorch is a pytorch codebase, it would probably be easiest to add it alongside the other models (in models/wrappers.py) as an alternative StyleGAN2 implementation. It might also be possible to convert StyleGan2-ADA-PyTorch pickles to the format expected by using rosinality's repo (https://github.com/rosinality/stylegan2-pytorch), but that seems more error-prone.
I agree StyleGan2-ADA-PyTorch implementation should be added to wrappers.py and I have tried this and haven't had time to finish it. However, I believe rosinality's repo (https://github.com/rosinality/stylegan2-pytorch) is meant to convert from tf weights and will not work.
While I was looking for a solution, I found the closed-form factorization implementation in rosinality's repo (https://github.com/rosinality/stylegan2-pytorch). I managed to get it working with the new StyleGan2-ADA-PyTorch models. You can find it here https://github.com/pbizimis/stylegan2-ada-pytorch. Closed-form factorization can be an alternative for Ganspace (https://arxiv.org/pdf/2007.06600.pdf).
For anyone that stumbles on this thread like I did in trying to find a solution for latent space manipulation with StyleGan2-ADA: while it is great work that led me to my current solution, pbizimis's code does not alter the w-space as I expected it to. But after creating my own working solution based on it, I saw that someone already published the same code improved to use w-space: https://github.com/dvschultz/stylegan2-ada-pytorch I would just caution that lines 38-40 of apply_factor.py may have better performance on GPU without the 'force_fp32=True'.
I agree StyleGan2-ADA-PyTorch implementation should be added to wrappers.py and I have tried this and haven't had time to finish it. However, I believe rosinality's repo (https://github.com/rosinality/stylegan2-pytorch) is meant to convert from tf weights and will not work.
Since this was a while ago, I though it would be worth checking wether the StyleGan2-ADA-PyTorch implementation had still not been added to wrappers.py?
I've implemented StyleGAN2-ada support (along with other changes) in my fork:
I've implemented StyleGAN2-ada support (along with other changes) in my fork:
@McFredward Hello, I know it's been a long time since you posted this fork, but I am trying to use it and I am having a few issues if you could please provide any explanation or guidance that would be super helpful.
Hey, I tried setting up Ganspace with StyleGan2-ADA-PyTorch models but it seems not possible without modifying code. Most errors show that the module torch_utils is necessary to load the model pkl files.
I also was not able to convert weights. Any ideas on how to make ganspace working with the new model files? Thanks