Implementation of Analyzing and Improving the Image Quality of StyleGAN (https://arxiv.org/abs/1912.04958) in PyTorch
I have tried to match official implementation as close as possible, but maybe there are some details I missed. So please use this implementation with care.
First create lmdb datasets:
python prepare_data.py --out LMDB_PATH --n_worker N_WORKER --size SIZE1,SIZE2,SIZE3,... DATASET_PATH
This will convert images to jpeg and pre-resizes it. This implementation does not use progressive growing, but you can create multiple resolution datasets using size arguments with comma separated lists, for the cases that you want to try another resolutions later.
Then you can train model in distributed settings
python -m torch.distributed.launch --nproc_per_node=N_GPU --master_port=PORT train.py --batch BATCH_SIZE --g_reg_every 8 LMDB_PATH
train.py supports Weights & Biases logging. If you want to use it, add --wandb arguments to the script.
At 110,000 iterations. (trained on 3.52M images)