Maybe a simpler approach that would not require any code change would work: you could set the environement variable CUDA_VISIBLE_DEVICES=-1 before launching the webui.
This will "hide" your graphics card to the pytorch library.
Edit: i had put =0 by inattention. The good value is -1. Using 0 means : make only the first device visible. Using -1 tells pytorch that no CUDA devices are visible.
On linux, just do "export CUDA_VISIBLE_DEVICES=-1" before launching the webui.sh script. (Assuming you are using bash)
On windows, you'll want to use the "set" command I think. I dont have a windows machine to test that aspect, but if you seauch for "pytorch cuda visible devices windows" you'll probably get the info you need
Oh, yeah, my bad. Setting it to 0 means : see the first GPU. The -1 signals that no cuda devices are available. I'll edit my post to avoid further confusions.
@echo off
cd "sd"
set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=--no-half --precision full --skip-torch-cuda-test
start /low /affinity 1F webui.bat
which sets the CPU affinity to only 5 logical cores
It was a Plex server, I thought the GPU would have NVENC and NVDEC but nope, it have a different thing that nothing supported. Given it was the 2GB model it wasn't useful for much else. So now it will sit on my shelf with all the other boards that hit decommission time.
It's the GPU doing the work, and even if you could somehow split the workload it would be a borderline useless venture anyway. If it takes 5 minutes to generate one low resolution image it's interesting on a technical level, but worthless on practical.
If you don't have a (beefy) GPU you can rent a cloud one, 3090 for about 35 cents an hour. It does that image in just about one second. We may be on Reddit, but don't completely discount your own time either.
I would expect so, in cpu only mode. For the hell of it I got it running on an old Core 2 duo machine I bought in 2011 recently. 20 steps at CFG 7 LMS took around 1 hour 20 minutes.
11
u/Jellybit Oct 17 '22
Congratulations and thanks for sharing the info. Out of curiosity, how long does it take to generate a 512x512 20-step Euler a image?
4
u/jprobichaud Oct 18 '22 edited Oct 18 '22
Maybe a simpler approach that would not require any code change would work: you could set the environement variable CUDA_VISIBLE_DEVICES=-1 before launching the webui.
This will "hide" your graphics card to the pytorch library.
Edit: i had put =0 by inattention. The good value is -1. Using 0 means : make only the first device visible. Using -1 tells pytorch that no CUDA devices are visible.
4
u/MiguelDanger Oct 18 '22
For me I have a script to install torchvision CPU edition:
and then my webui launch script:
which sets the CPU affinity to only 5 logical cores
4
u/[deleted] Oct 17 '22
Now to get this running on my raspberry Pi
3
u/[deleted] Oct 18 '22
Sd noob here. Does the cpu and gpu normally work together or is it just gpu. If so is there a way of combining power?
2
u/CadenceQuandry Oct 18 '22
Any chance this would run on a Mac?
2
u/Xelan255 Oct 18 '22
interesting, how good does this handle multithreading?
I guess this way regular RAM is used, which would allow for greater resolution in image generation?
2
u/fanidownload Oct 19 '22
Whow, you guys using gt 730? I even using colab even though mine gtx 750ti. I wish there is more sd update for low end pc?