harskish / ganspace

Discovering Interpretable GAN Controls [NeurIPS 2020]
Apache License 2.0
1.78k stars 264 forks source link

How to explore 18x512 dimensional style vectors #72

Open wmpauli opened 11 months ago

wmpauli commented 11 months ago

Hi @harskish , thank you for sharing your work. I have read you paper and have been debugging your code and there is one question I'll like to get some clarity on.

I have been working with the stylegan2, using what is sometimes referred to as w+ latent space (Abdal et al., 2020). That is, the style vector is 18x512 dimensions, with a different style vector for each generator block.

If I understand your code correctly, it uses 1x512 style vectors. If necessary, they are repeated, as e.g. here:

https://github.com/harskish/ganspace/blob/5a704c488ce9bd36d892c34ff78e4986f2850758/notebooks/notebook_utils.py#L87

I do see code in your repository, where there is a check on the length of the style vector, for one global vector, style mixing, and the 18 style vectors.

https://github.com/harskish/ganspace/blob/5a704c488ce9bd36d892c34ff78e4986f2850758/models/wrappers.py#L202

However, I don't see a way of configuring the scripts (e.g. interactive.py) such that they would sample a 18x512 style vector.

Unless I'm missing something and this can be done. Is the reasoning behind this that running a PCA on a 18*512 dimensional vector didn't produce stable results?

The reason I'm asking is because I have fine-tuned a stylegan2, such that it uses "w+" style vectors, but I don't see a way to use your approach to investigate it. Any suggestions welcome!