View Single Post
Old 2024-01-25, 16:12   Link #2
Renegade334
Sleepy Lurker
*Graphic Designer
 
 
Join Date: Jul 2006
Location: Nun'yabiznehz
Age: 38
Sorry, not really seeing where the hiccup could be coming from. Ray-tracing is definitely NOT necessary to use Stable Diffusion; the program does require CUDA to do all the low-level computing, but unless you're using either a rather old card, a discrete one or an entry-level one (and an old one, at that), SD should still show some tolerance. For the record, the images I've posted in both the Code Geass Image and Wallpapers and the Artificial Intelligence threads were generated on an i5-2500, 8GB of DDR3 RAM and a GTX970 Gaming 4GB VRAM. My copy of SD is configured NOT to use the CPU but the GPU. Granted, the GPU will start to crash on me as the image sizes grows beyond 768x768px or 1024x1024px (forget about applying Hires.fix upscaling to those numbers, too!) because it'll inevitably run out of free VRAM to work with, but it's feasible.

That said, there ARE a few things that can be done to lower the hardware requirements.

If you have Automatic1111, go to X:\pathtoStableDiffusion\Automatic1111\stable-diffusion-webui\ and find two files, "webui.bat" and "webui-user.bat".
- In "webui.bat", add "set CUDA_LAUNCH_BLOCKING=1" after "set ERROR_REPORTING=FALSE".
- Make a backup copy of "webui-user.bat" (rename it to something else like "backup_webui-user.bat" just in case) and insert into webui-user.bat the following lines before the instruction "call webui.bat":
Code:
set PYTORCH_CUDA_ALLOC_CONF=garbage_collection_threshold:0.6,max_split_size_mb:192
set COMMANDLINE_ARGS= --xformers --opt-sub-quad-attention --medvram --upcast-sampling --no-half-vae --skip-python-version-check
The --medvram and --opt-sub-quad-attention parameters will cut down on the VRAM requirements. Enabling xformers should also help.

That's what I personally roll with. Cut down on the number of installed extensions, they sometimes tend to add extra overhead or run into issues of their own (like ControlNet, which was causing crashes a couple days ago after a new Git update, until I disabled it). Oh, and update your Nvidia Geforce drivers just in case. Increasing your pagefile.sys size can help with certain memory issues, if your HDD or SSD has enough spare storage space.

Otherwise, have a look at Easy Diffusion. The hardware requirements are a very little bit lighter, the UI is somewhat simpler...but it lacks some of SD's full-fledged features (like support for some upscalers and more recent sampling methods) and fine-grain control.
If everything fails, yeah, it means your hardware is just not up to par. Less than 4GB VRAM and less than 8GB RAM is, I've been told, more or less the point where you'll start to make your life harder and harder for yourself.
__________________
<< -- Click to enter my (dead) GFX thread.

Last edited by Renegade334; 2024-01-26 at 07:36.
Renegade334 is offline   Reply With Quote