• To improve security, we will soon start forcing password resets for any account that uses a weak password on the next login. If you have a weak password or a defunct email, please update it now to prevent future disruption.

How to install/use the optimized SD version?

SDAI-futa

Newbie
Dec 16, 2023
28
30
I keep running out of RAM when I use SD. It's the "CUDA out of memory" issue that many see when using higher res or more realistic models.

I know there's an , but I'm not sure how to utilize it - I can't find the .py file in the folder in github on my system, so I'm not sure where they go and what do they replace.

Also, I'm running SD on Linux; I don't think it changes much - the folder structure and files are the same as Windows (I have a Windows installation as well but I rather not use it) . Is there someone here who figured it out and can help out?

Sorry if this is out of place, I was actually trying to put it under "Artwork" and I guess I got confused. Not sure if this should have a prefix of some sort, still figuring things out around here...
 

Winterfire

Forum Fanatic
Respected User
Game Developer
Sep 27, 2018
4,964
7,282
You just need to lower your settings, until you no longer run out of memory. So, if you are trying 1024 x 1024, try 512 x 512 instead, or lower. Too low, and you should probably consider giving up on trying AI with your potato.
 

SDAI-futa

Newbie
Dec 16, 2023
28
30
I am at a point where I can create images of about 600 × 800 before realizing without running out of vram.

There are several benefits to running SD on Linux, the two main ones is ability to tweak settings further, and privacy/safety of what you create.

Here are some of the few quick tweaks to do from my experience:

  • Run SD with --medvram flag. Not a big hit to performance.
  • Likewise, run with --xformers flag. On more recent Linux distributions, xformers are built in.
  • Install tcmalloc on your system to prevent freezes (memory "leaks")
Windows manages vram somewhat better from my experience especially since nvidea and the like have frequent updates to drivers, the newer ones come with options that support SD and AI generation better. However, with the above options and a few additional tweaks the experience overall leans to be better on Linux.

Quick solution, use Windows. More involved (and cheaper), use Linux.