stable-diffusion icon indicating copy to clipboard operation
stable-diffusion copied to clipboard

ERROR: CUDA out of memory

Open studiokevinabanto opened this issue 2 years ago • 3 comments

Hello, I have this error when I run it: RuntimeError: CUDA out of memory. Tried to allocate 58.00 MiB (GPU 0; 6.00 GiB total capacity; 5.19 GiB already allocated; 0 bytes free; 5.29 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

studiokevinabanto avatar Oct 31 '22 01:10 studiokevinabanto

You don't have enough GPU memory: 5.19 GiB already allocated; 0 bytes free. Solution: rent a GPU with more memory

a-toms avatar Nov 11 '22 15:11 a-toms

@a-toms , I have 1080TI with 11GB memory, and getting same error. Should I rent a GPU too ?

@studiokevinabanto , I have succeeded with using this : https://github.com/basujindal/stable-diffusion just put optimizedSD folder into your cloned folder and use script as told in readme.

firatsarlar avatar Nov 17 '22 22:11 firatsarlar

Is there a benchmark for GPU requirements that we can refer to?

shravankumar147 avatar May 01 '23 16:05 shravankumar147