rinongal / StyleGAN-nada

http://stylegan-nada.github.io/
MIT License
1.15k stars 146 forks source link

Style transfer of "White Walker" #53

Closed MrTornado24 closed 2 years ago

MrTornado24 commented 2 years ago

Hi, thanks for your impressive work! I tried to transfer style with "White Walker" but the result is not good as paper (especially hair and mouth). How should I reproduce the result in your paper?

image 下载

rinongal commented 2 years ago

Hi,

You can find the parameters we used for the white walkers (and some other models) in the paper's supplementary. Specifically, our white walker model used: 200 iterations, both ViT-B/32 and ViT-B/16, and 0.9 mixing.

The exact command we used is:

python train.py --size 1024 --batch 2 --n_sample 4 --output_dir /path/to/ffhq_to_white_walker --lr 0.002 --frozen_gen_ckpt /path/to/ffhq.pt --iter 201 --source_class "human" --target_class "white walker" --lambda_direction 1.0 --lambda_patch 0.0 --lambda_global 0.0 --lambda_texture 0.0 --lambda_manifold 0.0 --phase texture --auto_layer_k 18 --auto_layer_iters 1 --auto_layer_batch 8 --output_interval 200 --clip_models "ViT-B/32" "ViT-B/16" --clip_model_weights 1.0 1.0 --mixing 0.9 --save_interval 200

If you want to reproduce this in Colab without any code changes, just tick the 'improve shape' checkbox in your image, and keep the iterations around 300 (improve shape also turns on adaptive layer freezing, which we did not use for white walkers, and this generally requires more iterations).

Edit: Here's an example run in Colab

image

image