StyleGAN-nada icon indicating copy to clipboard operation
StyleGAN-nada copied to clipboard

How to use style mapper

Open MrTornado24 opened this issue 3 years ago • 1 comments

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?

MrTornado24 avatar Jun 23 '22 03:06 MrTornado24

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.

rinongal avatar Jun 26 '22 09:06 rinongal