stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[FIX]: split attention V1 fixes vram OOM issues
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
--opt-split-attention-v1 --xformers This solved it and that v1 split attention should be used by default imo I can do 2048x2048 on 3090 like before or even 4048x640, probably even higher cause it reserves about 8gb only Use it and forget about all the OOM crap Wow 3090 can even do 4048x4048 but it is quite slow, doesnt OOM tho so it works !
Steps to reproduce the problem
.
What should have happened?
.
Commit where the problem happens
https://github.com/AUTOMATIC1111/stable-diffusion-webui/commits/master
What platforms do you use to access the UI ?
Windows
What browsers do you use to access the UI ?
Google Chrome
Command Line Arguments
--opt-split-attention-v1 --xformers
List of extensions
.
Console logs
.
Additional information
No response
Do xformers do anything here? I think that only first optimization is applied
Do xformers do anything here? I think that only first optimization is applied
yeh they speedup the generation from 15 seconds to 6 seconds but they dont affect VRAM cause i was able to do same sizes without them
why --opt-split-attention-v1? and not --opt-split-attention
V1 uses less memory, iirc
Are you sure you're measuring the VRAM usage accurately? I thought the 3090 had 24GB of vram, but you mentioned 8GB of usage using --opt-split-attention-v1, and out-of-memory problems without it, leaving 16GB on the table. I probably misunderstand what you meant by 'reserves' 8GB.
I do believe it helped memory problems, though! I'm jealous, my max limit on 2070super 8GB seems to be 1280x1280 (but without anything that takes extra memory like ControlNet, which drops the max resolution a bit). [Edit: not counting --medvram option]
I recommend using MSI Afterburner's hardware monitor graphs. It's pretty interesting to see the fluctuations with 100ms resolution.
Here's an example where I just did 15steps at 1280x1280: