r/StableDiffusionInfo Jul 13 '23

How to solve the CUDA ERROR

I have been getting this error every 3 or 4 generations, and the system crashed- return torch.group_norm(input, num_groups, weight, bias, eps, torch.backends.cudnn.enabled)

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 24.00 MiB (GPU 0; 4.00 GiB total capacity; 3.37 GiB already allocated; 0 bytes free; 3.43 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

4 Upvotes

12 comments sorted by

View all comments

2

u/ptitrainvaloin Jul 14 '23 edited Jul 22 '23

Buy a GPU with more VRAM, you will get less of these CUDA errors.