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

stable diffusion - Img2img error - CUDA out of Memory

Open NiuDaVinci opened this issue 2 years ago • 1 comments

ERROR:""RuntimeError: CUDA out of memory. Tried to allocate 5.86 GiB (GPU 0; 12.00 GiB total capacity; 8.03 GiB already allocated; 1.47 GiB free; 8.13 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 Time taken: 1.32sTorch active/reserved: 8227/10464 MiB, Sys VRAM: 12288/12288 MiB (100.0%)""

I recently installed anaconda with stablediffusion-infinity. Now when I use the normal stable diffusion on my pc i get this error.

I'm super geeky noob, please explain like im 10 to me on how i solve the problem.

NiuDaVinci avatar Feb 14 '23 19:02 NiuDaVinci

@NiuDaVinci Try to run the code with a smaller mini-batch size

bekhzod-olimov avatar Feb 21 '23 08:02 bekhzod-olimov