Home Artists Posts Import Register

Content

For the past months, I don't know for how long, I've been having some difficulties in making stuff using my Automatic1111, I didn't notice why, but just felt very slow and heavy.

This is a post to help you in case you are having the same problem using Automatic1111 or a similar WebUI for Stable Diffusion.

DISCLAIMER: I USE A RTX 4090 WITH 24GB RAM, IF YOU HAVE LOW RAM (8GB OR LESS) THIS MAY OR MAY NOT HELP YOU. IT'S EASY TO REVERT THE SETTINGS THOUGH.

2 Days ago I had to monitor my GPU and CPU for another reason. Then I've noticed that it was barely using 50-60% of my GPU when generating images or upscaling. Then I did some research and it's a problem since a driver update from NVIDIA GPU. It now can share video memory to help diminish your GPU workload.

The problem is that this is turned on by default in everything.

If you think you are having the same problem, you can follow this NVIDIA tutorial to change this for your Stable Diffusion only: https://nvidia.custhelp.com/app/answers/detail/a_id/5490/~/system-memory-fallback-for-stable-diffusion

I had another problem. I don't know what happened with my Automatic1111, but there was a memory leak and it wasn't helping me even after doing this. So I reinstalled it and after installing extensions, setting up everything I've ran a test.

The same image, with same prompts, settings and seed.

  • The time it took to generate BEFORE fixing: 74.5 seconds.
  • The time it took to generate AFTER fixing: 11.7 seconds.

I also felt the difference when upscaling in batch. This was done more on the experience/feeling. But something that I expected to take 60-70 minutes, took only 15 minutes.

TIP: If you are having trouble finding the process that stable diffusion is using, generate something in Automatic1111 and while it's generating filter your processes by RAM usage. The python.exe in there is the process. Just right-click it and find the destination folder that way.

A final disclaimer: It doesn't mean that I'm going to work 4-6 times faster, specially because I've been using some online services to help speed up. But surely helps me doing stuff in older styles. Also helps me making more original content.

Files

Comments

akastyr

tested, the fix did not change my generation times with my 4070, but it's probably because my images are small, koi uses large resolutions and SDXL

artkoikoi

It can be many things, for me it only worked after I re-installed automatic1111, but my test was done with a 512x768 image, 30 steps + 15 highres steps for x2 highres fix, I was using a character LoRA too. (It was with Ulti from OP) It's possible that you are not having the same problem, but you can test that by using some monitoring software, like MSI Afterburner and check if your GPU is being used near 90-100% when generating images.

Mr Ericsan

Interesting, is this one of those planned obsolescence ploy. Or there was another purpose of such update ... like prevent crashes or something?

artkoikoi

I believe they didn't think about AI at first when doing this kind of thing. It uses your normal RAM to increase the size of your VRAM so you can load more textures for games and things like that.