Closed Penguin-jpg closed 2 years ago
@Penguin-jpg did you find an answer for your question?
I have a similar issue, on a single GPU with 12GB VRAM I always get torch.cuda.OutOfMemoryError: CUDA out of memory
, even if I set the batch size to 1.
@Penguin-jpg did you find an answer for your question?
I have a similar issue, on a single GPU with 12GB VRAM I always get
torch.cuda.OutOfMemoryError: CUDA out of memory
, even if I set the batch size to 1.
Hello, I think the problem is that 12GB is really not enough, so you might need a GPU with larger VRAM.
Thanks for your fast reply @Penguin-jpg . I think you are right for the default configuration, but I made a lucky punch and changed the --num_channels
parameter from 256 to 128. Now I can train on my 128x128 images without getting memory issues.
@RabJon @Penguin-jpg did you guys resolve the issue? I have 4 T4 GPUs (16 GB each) but I'm getting CUDA out of memory issue even when batch_size = 1.
Thanks for your fast reply @Penguin-jpg . I think you are right for the default configuration, but I made a lucky punch and changed the
--num_channels
parameter from 256 to 128. Now I can train on my 128x128 images without getting memory issues.
@sushilkhadkaanon as I wrote in the comment above, I could solve my problems for 128x128 px images. However, I am not sure about bigger images.
I used Tesla T4 on google colab with batch size 1 but still get cuda out of memory error. Is 16GB VRAM not enough to train 512 model? (I also tired 256 uncond model with batch size 1 and still cuda out of memory.)
These are flags I used:
script: