harskish / ganspace

Discovering Interpretable GAN Controls [NeurIPS 2020]
Apache License 2.0
1.78k stars 264 forks source link

RuntimeError: CUDA out of memory #46

Closed ghost closed 3 years ago

ghost commented 3 years ago

I've found a fix, it's below.

First of all, thank you for this wonderful tool!

I have gtx 750ti GPU, and I'm getting this error (running python interactive.py --model=StyleGAN2 --class=ffhq --layer=style --use_w -n=1_000_000 -b=10_000). I'm using Linux Mint 20. I've also tried to setup StyleGAN2. When I run the commands from "Usage", it opens the window and then closes it when I move any slider. Apparently, 2 GB of VRAM is not enough. Is there any way to make it work with ganspace? For example reduce batch size? Or use CPU instead? If not, are there google colab notebooks that can be used with the same functionality?

P.S. I was able to run it after changing -b option to 1_000. I assume it's the batch size.

FlashlightET commented 3 years ago

same here, but 1660S and windows 10 even with -b on 1,000. and i have 6gb of vram!!! why does the 2gb one work???