runwayml / stable-diffusion

Latent Text-to-Image Diffusion

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERROR: CUDA out of memory

studiokevinabanto opened this issue · 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

commented

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

@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.

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