stable-diffusion-webui
stable-diffusion-webui copied to clipboard
CUDA OOM with somehow 17GB VRAM free
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
Whenever I try to generate at certain resolutions or batch sizes, I get a CUDA out of memory error that shows I have more than enough memory free. I'm not even trying to do anything crazy here. I have 24GB VRAM (3090Ti) and I can't even generate 960x960 with a batch size of 1.
Considering my specs (see below), this makes no sense. The OOM error even contradicts itself saying I am out of memory when I clearly have 16.99GiB free. I'm not running anything else and it occurs even right after a fresh reboot.
I've tried using --medvram, --lowram, --opt-split-attention all without any difference. I thought it might have to do with my cuda cache but even after rebooting or even manually clearing the cache, the problem persists. From talking with others, it seems I'm not the only one with this issue, and like the others, none of the command-line arguments nor common solutions have fixed it. Short of further upgrading my system, I tried everything suggested in #1259, #598, and any other remotely related issues with no luck.
Please help.
Steps to reproduce the problem
- Acquire Nvidia 3090Ti and 16GB RAM
- Running Windows 10, install Python 3.10.6, acquire SD model, clone WebUI repo ac085628540d0ec6a988fad93f5b8f2154209571 (latest head/master at time of writing)
- Reboot computer
- Launch WebUI webui-user.bat
- Set batch size to 1, resolution to 960x960
- Hit generate and look at the terminal log
What should have happened?
Images at greater than around 960x960 batch size 1 should have generated without throwing CUDA OOM error. If thrown, error should not show that I do indeed have free VRAM memory available for use since I would otherwise expect it to be used for image generation.
Commit where the problem happens
ac085628540d0ec6a988fad93f5b8f2154209571
What platforms do you use to access UI ?
Windows
What browsers do you use to access the UI ?
Mozilla Firefox, Brave
Command Line Arguments
--medvram --lowram --opt-split-attention
tried both individually and together
Additional information, context and logs
Windows 10, Nvidia 3090Ti (24GB VRAM), 16GB RAM, Python 3.10.6, official SD 1.4 model from huggingface, commit ac085628540d0ec6a988fad93f5b8f2154209571 (latest at time of writing) WebUI build.
Ive 12vram 3060 and get same error trying 512x640. 😅 So annoying,
I think GPU memory isn’t freed ,same issue
#1259 looks like a very old issue, nevertheless, duplicate.