-
Notifications
You must be signed in to change notification settings - Fork 27.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: getting a lot of memory errors lately after just a few generations #7411
Comments
I'm getting the same after updating from SD 1.4 era webui to the latest. I used to be able to do batches of 4 images at up to 768x512 on any model, now i get CUDA errors sometimes when doing a single 512x512 image. There used to be a settings option to "cache in VRAM" the models, among other things that could be saved in VRAM, i couldn't find it (i checked twice, but i still may have missed it). I am trying to find the command line args / flags so i can try the reduced memory options, where are they? |
reinstalling xformers helped, but there was an issue with the scriptlet to install it, it was like xformers==xformers==0.0.16r(some numbers) i changed it to xformers==0.0.16r(some numbers) and it installed. I also had to turn off the float32 upscale thing in the settings -> stable diffusion sorry my window scrolled too far and i got booted off the VPN, so i can't copy and paste. hopefully someone else knows what i am talking about. |
@gsgoldma some extensions load their models and keep them in vram until the program is closed. disable the ones that do that when you need to, by unticking the box. If you do a fresh install, you will not have this issue.
@genewitch i think you're after something else. that logically sounds like it'll put more of the model into vram. when you run with |
i think resetting my venv and updating my graphics card driver might have helped, maybe just the venv wipe did. we'll see if the error comes back, but i'll leave it open for the other guy who has the issue still. maybe try the venv wipe and reinstall and report back, ill close it if it solves your issue too. |
@gsgoldma I see you are using prompt fusion. Seeing this, I'm even more certain that it's an issue caused by the extension. see ljleb/prompt-fusion-extension#35, you may be in a similar situation. Does it stop throwing when you stop using interpolation syntax? If interpolation syntax doesn't leak memory or something, then maybe the issue reported on our side isn't related to the extension after all? I'm not sure I understand why this happens if it's caused by the extension. Not a single line in the error message seems to contain a file from fusion or related to it, so I'm really confused by this one... Edit: I just realized you are literally the same person as in the issue lol. Can you clarify whether you figured that it wasn't related to the extension after all? |
@lijeb It did not throw it as quickly when I didn't use it, but it always would eventually. I deleted my old venv and saw an updated nvidia game driver, but I'm not sure which action, if not both, has helped. My generation speeds were becoming abysmally slow, about 1 minute, even without --medvram on, and now they're at 10 -16 seconds, so something is fixed by what I did. There may still be a problem with prompt fusion but maybe it will take longer usage now for that to become apparent. |
I'm getting this error whenever I use upscaler. I can generate images from txt2img but if I select Hires. fix and change any pixel by 1, I got this error. I also can't upscale from img2img, too. (It's not just upscale, if a change a 512x512 image to 511x511 I'm again getting this error.) |
I'm having this issue as well, I have installed it twice just to be sure it's not an install error. I can only generate up to 3-4 images until my desktop crashes and I'm forced to restart the session. I'm only generating 512x512 images, in the past I could generate hundreds of those without running into out of memory problems. |
Started having these today when using highres fix. Running on 8gb vram i never had these issues before, unsure if it's because I installed some extensions but doesn't seem to make any sense as I was just generating standard images without any additional strain. [solved] on my part it was using --api and for some reason it stopped me from being able to generate with highres |
this fixes it , v1 split attention |
Is there an existing issue for this?
What happened?
since SD came out until yesterday I was able to generate nearly infinite times on a single session, but after the last couple updates it can give me an out of memory error in as little as 4 to 5 generations.. sometimes if i wait a few minutes it will be good to go, but other times I have to restart the program.
could be an updated extension or the main program, not sure
Steps to reproduce the problem
What should have happened?
not run out of memory
Commit where the problem happens
2c1bb46
What platforms do you use to access the UI ?
Windows
What browsers do you use to access the UI ?
No response
Command Line Arguments
List of extensions
ABG_extension/
Config-Presets/
DreamArtist-sd-webui-extension/
Hypernetwork-MonkeyPatch-Extension/
PromptGallery-stable-diffusion-webui/
SD-latent-mirroring/
StylePile/
a1111-sd-webui-haku-img/
a1111-sd-webui-tagcomplete/
animator_extension/
asymmetric-tiling-sd-webui/
auto-sd-paint-ext/
batch-face-swap/
booru2prompt/
custom-diffusion-webui/
ddetailer/
deforum-for-automatic1111-webui/
depth-image-io-for-SDWebui/
depthmap2mask/
embedding-inspector/
enhanced-img2img/
extensions.py
model-keyword/
multi-subject-render/
novelai-2-local-prompt/
openOutpaint-webUI-extension/
prompt-fusion-extension/
prompt_gallery_name.json
'put extensions here.txt'
sd-dynamic-prompts/
sd-extension-aesthetic-scorer/
sd-extension-steps-animation/
sd-extension-system-info/
sd-infinity-grid-generator-script/
sd-web-ui-quickcss/
sd-webui-additional-networks/
sd-webui-gelbooru-prompt/
sd-webui-model-converter/
sd-webui-multiple-hypernetworks/
sd-webui-riffusion/
sd_dreambooth_extension/
sd_grid_add_image_number/
sd_web_ui_preset_utils/
sdweb-merge-block-weighted-gui/
sdweb-merge-board/
seed_travel/
shift-attention/
stable-diffusion-webui-Prompt_Generator/
stable-diffusion-webui-aesthetic-gradients/
stable-diffusion-webui-artists-to-study/
stable-diffusion-webui-auto-tls-https/
stable-diffusion-webui-cafe-aesthetic/
stable-diffusion-webui-conditioning-highres-fix/
stable-diffusion-webui-daam/
stable-diffusion-webui-dataset-tag-editor/
stable-diffusion-webui-depthmap-script/
stable-diffusion-webui-embedding-editor/
stable-diffusion-webui-images-browser/
stable-diffusion-webui-inspiration/
stable-diffusion-webui-instruct-pix2pix/
stable-diffusion-webui-pixelization/
stable-diffusion-webui-promptgen/
stable-diffusion-webui-tokenizer/
stable-diffusion-webui-visualize-cross-attention-extension/
stable-diffusion-webui-wd14-tagger/
stable-diffusion-webui-wildcards/
ultimate-upscale-for-automatic1111/
unprompted/
Console logs
Additional information
if i wait a few minutes sometimes it works again, like it's taking a while to give back the vram
No response
The text was updated successfully, but these errors were encountered: