Info / Warning about NVIDIA Sharing Memory (Patreon)
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.