NVlabs / stylegan3

Official PyTorch implementation of StyleGAN3
Other
6.38k stars 1.12k forks source link

CUDA OOM #177

Open PodoprikhinMaxim opened 2 years ago

PodoprikhinMaxim commented 2 years ago

I tried to run training script of stylegan on Google Colab with parameters, that were in readme !python train.py --outdir=../training-runs --cfg=stylegan3-r --data=../69000-20220703T162753Z-001.zip --gpus=1 --batch=32 --gamma=1 --mirror=1 and i got CUDA out-of-memory error. But in training configurations indicated that model uses about 4GB memory. I tried to reduce batch size to 4 (8 and more is not working) and it worked, but i dont understand, why while training gpu uses only about 4-5GB? Is there any ways to avoid this error with increased batch size, or I just don't understand something in way how memory is allocating?