AnimeSuki Forums

Register Forum Rules FAQ Members List Social Groups Search Today's Posts Mark Forums Read

Go Back   AnimeSuki Forum > Support > Tech Support

Notices

Reply
 
Thread Tools
Old 2024-01-25, 05:30   Link #1
scififan
Senior Member
 
Join Date: May 2014
need a way to bypass RTX/CUDA requirement

After watched some Stable Diffusion tutorials online, I tried to follow the instruction. For example:


However, my computers are not meeting the hardware requirement. The diffusion module, by default, requires to use cuda. In some instances, I could bypass the requirement by using to("cpu"). When I tried to use more advanced feature, the program just output errors. According online answer, it is due to missing Nvidia's RTX. The Nvida chip on my PC is not meeting the requirement. Some people boasted that AMD graphic chip could do the same thing, but the online research showed the opposite conclusion.

How can I use Stable Diffusion without an error due to mssing RTX hardware?
scififan is offline   Reply With Quote
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
Old 2024-01-25, 21:51   Link #3
scififan
Senior Member
 
Join Date: May 2014
Thank you for the information. I will try out your advice. So, I still need to upgrade my PC afterall.
scififan is offline   Reply With Quote
Old 2024-01-26, 07:19   Link #4
Renegade334
Sleepy Lurker
*Graphic Designer
 
 
Join Date: Jul 2006
Location: Nun'yabiznehz
Age: 38
Well, the amount of onboard memory is FAR more important than raw computing power. Most crashes I've had were caused by insufficient VRAM...sometimes facilitated by an excess of processes (upscaling, openpose, etc.) and overambitious settings (like foolishly trying to generate a 1920x1080p pic instead of sticking to multiples of 256px or 512px and never going above 1280px in either height or width). Unloading all the legwork on the CPU rather than the GPU will still have you run headlong into the RAM bottleneck (don't forget that you're also sharing your RAM with Windows processes, which could eat up to half of it depending on its contents and configuration; a GPU's VRAM isn't as dramatically affected by that), I'm afraid.

So...yeah, you should look to upgrade your RAM just in case and get a GPU (with CUDA support, not necessarily a RTX) that has, say, 6GB VRAM. But the question is: is this worth the investment or would you rather save your money for other, more useful/vital stuff? I must admit that I, too, was tempted by the demons of hardware upgrade when going into Stable Diffusion, but I eventually told myself, "dude, it's just a hobby. Why would I fork 200-300+ Euros for a hobby and an occasional one at that? Knock it off."
__________________
<< -- Click to enter my (dead) GFX thread.

Last edited by Renegade334; 2024-01-26 at 07:33.
Renegade334 is offline   Reply With Quote
Old 2024-02-10, 15:35   Link #5
Liddo-kun
is this so?
 
 
Join Date: Mar 2007
Location: Gradius Home World
Quote:
Originally Posted by scififan View Post

How can I use Stable Diffusion without an error due to mssing RTX hardware?
what gpu are you currently using?
Liddo-kun is offline   Reply With Quote
Old 2024-02-13, 00:51   Link #6
scififan
Senior Member
 
Join Date: May 2014
Quote:
Originally Posted by Liddo-kun View Post
what gpu are you currently using?
It has duall gpu.
Quote:
$ sudo lshw -C display
*-display UNCLAIMED
description: 3D controller
product: TU117M [GeForce MX450]
vendor: NVIDIA Corporation

*-display
description: VGA compatible controller
product: Lucienne
vendor: Advanced Micro Devices, Inc. [AMD/ATI]
Running LLaMA has similar issue.
scififan is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 00:30.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
We use Silk.