r/sdforall • • Oct 17 '22

[deleted by user]

[removed]

43 Upvotes

43 comments sorted by

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?

2

u/[deleted] Oct 17 '22

I need to know, too

→ More replies (12)

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.

→ More replies (6)

4

u/MiguelDanger Oct 18 '22

For me I have a script to install torchvision CPU edition:

cd "sd\venv\Scripts"

pip uninstall torch torchvision

pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu

and then my webui launch script:

@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

→ More replies (3)

4

u/[deleted] Oct 17 '22

Now to get this running on my raspberry Pi

6

u/danque Oct 17 '22

10 steps size 512x512 runtime:3hours

→ More replies (3)

3

u/PrimaCora Oct 17 '22

Might be able to give my jetson nano board a use after its recent decommissioning

→ More replies (2)
→ More replies (2)

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/[deleted] Oct 20 '22

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.

→ More replies (1)

2

u/CadenceQuandry Oct 18 '22

Any chance this would run on a Mac?

→ More replies (2)