diff options
author | Dynamic <bradje@naver.com> | 2022-10-25 09:27:32 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-25 09:27:32 +0000 |
commit | 563fb0aa39faca32187e78c07bec695531f21f39 (patch) | |
tree | e8ba5b699b256ce90a07c52c52051e504f601659 /modules/shared.py | |
parent | e595b41c9d8a596b9b29d9505324e9afca2f12b5 (diff) | |
parent | 3e15f8e0f5cc87507f77546d92435670644dbd18 (diff) | |
download | stable-diffusion-webui-gfx803-563fb0aa39faca32187e78c07bec695531f21f39.tar.gz stable-diffusion-webui-gfx803-563fb0aa39faca32187e78c07bec695531f21f39.tar.bz2 stable-diffusion-webui-gfx803-563fb0aa39faca32187e78c07bec695531f21f39.zip |
Merge branch 'AUTOMATIC1111:master' into kr-localization
Diffstat (limited to 'modules/shared.py')
-rw-r--r-- | modules/shared.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/shared.py b/modules/shared.py index 76cbb1bd..308fccce 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -58,7 +58,7 @@ parser.add_argument("--opt-split-attention", action='store_true', help="force-en parser.add_argument("--opt-split-attention-invokeai", action='store_true', help="force-enables InvokeAI's cross-attention layer optimization. By default, it's on when cuda is unavailable.")
parser.add_argument("--opt-split-attention-v1", action='store_true', help="enable older version of split attention optimization that does not consume all the VRAM it can find")
parser.add_argument("--disable-opt-split-attention", action='store_true', help="force-disables cross-attention layer optimization")
-parser.add_argument("--use-cpu", nargs='+',choices=['all', 'sd', 'interrogate', 'gfpgan', 'bsrgan', 'esrgan', 'scunet', 'codeformer'], help="use CPU as torch device for specified modules", default=[], type=str.lower)
+parser.add_argument("--use-cpu", nargs='+',choices=['all', 'sd', 'interrogate', 'gfpgan', 'swinir', 'esrgan', 'scunet', 'codeformer'], help="use CPU as torch device for specified modules", default=[], type=str.lower)
parser.add_argument("--listen", action='store_true', help="launch gradio with 0.0.0.0 as server name, allowing to respond to network requests")
parser.add_argument("--port", type=int, help="launch gradio with given server port, you need root/admin rights for ports < 1024, defaults to 7860 if available", default=None)
parser.add_argument("--show-negative-prompt", action='store_true', help="does not do anything", default=False)
@@ -96,8 +96,8 @@ restricted_opts = [ "outdir_save",
]
-devices.device, devices.device_interrogate, devices.device_gfpgan, devices.device_bsrgan, devices.device_esrgan, devices.device_scunet, devices.device_codeformer = \
-(devices.cpu if any(y in cmd_opts.use_cpu for y in [x, 'all']) else devices.get_optimal_device() for x in ['sd', 'interrogate', 'gfpgan', 'bsrgan', 'esrgan', 'scunet', 'codeformer'])
+devices.device, devices.device_interrogate, devices.device_gfpgan, devices.device_swinir, devices.device_esrgan, devices.device_scunet, devices.device_codeformer = \
+(devices.cpu if any(y in cmd_opts.use_cpu for y in [x, 'all']) else devices.get_optimal_device() for x in ['sd', 'interrogate', 'gfpgan', 'swinir', 'esrgan', 'scunet', 'codeformer'])
device = devices.device
weight_load_location = None if cmd_opts.lowram else "cpu"
|