RuntimeError: CUDA out of memory
I have an RTX 3050 4GB VRAM GPU. I tried to run the script with different width and height parameters (64x64, 128x128, 512x512)
It did not help
I have also did
set PYTORCH_CUDA_ALLOC_CONF=garbage_collection_threshold:0.6,max_split_size_mb:128
The error i get is this
RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 4.00 GiB total capacity; 3.42 GiB already allocated; 0 bytes free; 3.48 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
What else can i do ? How can i solve this ?
you simply do not have enough vram for this, try to use med vram or low vram setting