Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use style mapper #54

Open
MrTornado24 opened this issue Jun 23, 2022 · 1 comment
Open

How to use style mapper #54

MrTornado24 opened this issue Jun 23, 2022 · 1 comment

Comments

@MrTornado24
Copy link

Hi, thanks for your impressive work! I am not sure how to use a style mapper to improve performance in some cases. Could you please share some tips or scripts for training a style mapper and how to use it with a fine-tuned generator?

@rinongal
Copy link
Owner

Hi,

Regarding the mapper - the first thing you need to see if whether or not you're in a situation where the mapper can help. Basically, if your model outputs some results that match your intent, but also some that don't (e.g. it outputs both cats and dogs) then the mapper can help you identify the areas of the latent space where you have cats.
It will not help you if the model fails to produce anything reasonable from your target class.

On how to train the mapper itself: Have a look at the mapper part in https://github.com/orpatashnik/StyleCLIP
We have the code for the mapper with our minor changes in https://github.com/rinongal/StyleGAN-nada/tree/main/ZSSGAN/mapper
Basically, you can run the training with the same command as the original StyleCLIP mapper. The only extra argument is --norm_lambda which controls the strength of an additional regularization term that we added. However, you can probably just leave it at the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants