无法使用 `512x512` 训练 `stylegan3-r`
作者: AmitMY创建于 2023年5月5日更新于 2025年8月6日
Describe the bug
I can train stylegan3-r with 256x256 resolution, or stylegan3-t with 512x512, but not stylegan3-rwith512x512`.
To Reproduce
Python train.py --outdir=/scratch/training-runs --cfg=stylegan3-r \
--data=/scratch/datasets/frames512x512.zip \
--gpus=4 --batch=16 --gamma=10 --aug=noaugLogs
Training options:
{
"G_kwargs": {
"class_name": "training.networks_stylegan3.Generator",
"z_dim": 512,
"w_dim": 512,
"mapping_kwargs": {
"num_layers": 2
},
"channel_base": 65536,
"channel_max": 1024,
"magnitude_ema_beta": 0.9994456359721023,
"conv_kernel": 1,
"use_radial_filters": true
},
"D_kwargs": {
"class_name": "training.networks_stylegan2.Discriminator",
"block_kwargs": {
"freeze_layers": 0
},
"mapping_kwargs": {},
"epilogue_kwargs": {
"mbstd_group_size": 4
},
"channel_base": 32768,
"channel_max": 512
},
"G_opt_kwargs": {
"class_name": "torch.optim.Adam",
"betas": [
0,
0.99
],
"eps": 1e-08,
"lr": 0.0025
},
"D_opt_kwargs": {
"class_name": "torch.optim.Adam",
"betas": [
0,
0.99
],
"eps": 1e-08,
"lr": 0.002
},
"loss_kwargs": {
"class_name": "training.loss.StyleGAN2Loss",
"r1_gamma": 10.0,
"blur_init_sigma": 0,
"blur_fade_kimg": 100.0
},
"data_loader_kwargs": {
"pin_memory": true,
"prefetch_factor": 2,
"num_workers": 3
},
"training_set_kwargs": {
"class_name": "training.dataset.ImageFolderDataset",
"path": "/scratch/datasets/sign-language-512x512.zip",
"use_labels": false,
"max_size": 32704,
"xflip": false,
"resolution": 512,
"random_seed": 0
},
"num_gpus": 4,
"batch_size": 16,
"batch_gpu": 4,
"metrics": [
"fid50k_full"
],
"total_kimg": 25000,
"kimg_per_tick": 4,
"image_snapshot_ticks": 50,
"network_snapshot_ticks": 50,
"random_seed": 0,
"ema_kimg": 5.0,
"resume_pkl": "https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-r-afhqv2-512x512.pkl",
"ada_kimg": 100,
"ema_rampup": null,
"run_dir": "/scratch/training-runs/00029-stylegan3-r-sign-language-512x512-gpus4-batch16-gamma10"
}
Output directory: /scratch/training-runs/00029-stylegan3-r-sign-language-512x512-gpus4-batch16-gamma10
Number of GPUs: 4
Batch size: 16 images
Training duration: 25000 kimg
Dataset path: /scratch/datasets/sign-language-512x512.zip
Dataset size: 32704 images
Dataset resolution: 512
Dataset labels: False
Dataset x-flips: False内容来源: NVlabs/stylegan3