diff options
author | obsol <33932119+read-0nly@users.noreply.github.com> | 2023-11-28 00:21:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-28 00:21:43 +0000 |
commit | 3cd6e1d0a0877e6f1ac931c8253e6eee09da3805 (patch) | |
tree | 10267d6eb79879821398684429012d79a8d29da1 /modules/devices.py | |
parent | 4afaaf8a020c1df457bcf7250cb1c7f609699fa7 (diff) | |
download | stable-diffusion-webui-gfx803-3cd6e1d0a0877e6f1ac931c8253e6eee09da3805.tar.gz stable-diffusion-webui-gfx803-3cd6e1d0a0877e6f1ac931c8253e6eee09da3805.tar.bz2 stable-diffusion-webui-gfx803-3cd6e1d0a0877e6f1ac931c8253e6eee09da3805.zip |
Update devices.py
fixes issue where "--use-cpu" all properly makes SD run on CPU but leaves ControlNet (and other extensions, I presume) pointed at GPU, causing a crash in ControlNet caused by a mismatch between devices between SD and CN
https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/14097
Diffstat (limited to 'modules/devices.py')
-rw-r--r-- | modules/devices.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/devices.py b/modules/devices.py index c01f0602..65efcf1e 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -38,7 +38,7 @@ def get_optimal_device(): def get_device_for(task): - if task in shared.cmd_opts.use_cpu: + if task in shared.cmd_opts.use_cpu or "all" in shared.cmd_opts.use_cpu: return cpu return get_optimal_device() |