diff options
author | 不会画画的中医不是好程序员 <yfszzx@gmail.com> | 2022-10-25 07:38:33 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-25 07:38:33 +0000 |
commit | 5bfa2b23ca6dad7d2664bfab5dab4b1dfabf5b7f (patch) | |
tree | 7e23ff3f180ada71bc0824270efa82e7cfe68397 /modules/shared.py | |
parent | ff305acd51cc71c5eea8aee0f537a26a6d1ba2a1 (diff) | |
parent | 91c1e1e6a92061b99c92a5b1d548535907d2ad96 (diff) | |
download | stable-diffusion-webui-gfx803-5bfa2b23ca6dad7d2664bfab5dab4b1dfabf5b7f.tar.gz stable-diffusion-webui-gfx803-5bfa2b23ca6dad7d2664bfab5dab4b1dfabf5b7f.tar.bz2 stable-diffusion-webui-gfx803-5bfa2b23ca6dad7d2664bfab5dab4b1dfabf5b7f.zip |
Merge branch 'AUTOMATIC1111:master' into Inspiron
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 7b1fadf2..813f91ef 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)
@@ -97,8 +97,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"
|