diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-09-18 17:55:46 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-09-18 17:55:46 +0000 |
commit | cae5c5fa8d88a6d4206ec7d89e53685d53afe4c0 (patch) | |
tree | 4e055443670e477c73e01380bcededc51506a56a /modules/shared.py | |
parent | 6a28aac8666a301b066f1a0717a2bd3924111595 (diff) | |
download | stable-diffusion-webui-gfx803-cae5c5fa8d88a6d4206ec7d89e53685d53afe4c0.tar.gz stable-diffusion-webui-gfx803-cae5c5fa8d88a6d4206ec7d89e53685d53afe4c0.tar.bz2 stable-diffusion-webui-gfx803-cae5c5fa8d88a6d4206ec7d89e53685d53afe4c0.zip |
Making opt split attention the default. Are you upset about this? Sorry.
Diffstat (limited to 'modules/shared.py')
-rw-r--r-- | modules/shared.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/shared.py b/modules/shared.py index c5742c10..eb4db55a 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -36,8 +36,9 @@ parser.add_argument("--unload-gfpgan", action='store_true', help="does not do an parser.add_argument("--precision", type=str, help="evaluate at this precision", choices=["full", "autocast"], default="autocast")
parser.add_argument("--share", action='store_true', help="use share=True for gradio and make the UI accessible through their site (doesn't work for me but you might have better luck)")
parser.add_argument("--esrgan-models-path", type=str, help="path to directory with ESRGAN models", default=os.path.join(script_path, 'ESRGAN'))
-parser.add_argument("--opt-split-attention", action='store_true', help="enable optimization that reduce vram usage by a lot for about 10%% decrease in performance")
-parser.add_argument("--opt-split-attention-v1", action='store_true', help="enable older version of --opt-split-attention optimization")
+parser.add_argument("--opt-split-attention", action='store_true', help="does not do anything")
+parser.add_argument("--disable-opt-split-attention", action='store_true', help="disable an optimization that reduces vram usage by a lot")
+parser.add_argument("--opt-split-attention-v1", action='store_true', help="enable older version of split attention optimization that does not consaumes all the VRAM it can find")
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)
@@ -48,9 +49,11 @@ parser.add_argument("--gradio-debug", action='store_true', help="launch gradio parser.add_argument("--gradio-auth", type=str, help='set gradio authentication like "username:password"; or comma-delimit multiple like "u1:p1,u2:p2,u3:p3"', default=None)
parser.add_argument("--opt-channelslast", action='store_true', help="change memory type for stable diffusion to channels last")
parser.add_argument("--styles-file", type=str, help="filename to use for styles", default=os.path.join(script_path, 'styles.csv'))
-
cmd_opts = parser.parse_args()
+if cmd_opts.opt_split_attention:
+ print("Information: --opt-split-attention is now the default. To remove this message, remove --opt-split-attention from command line arguments. To disable the optimization, use --disable-opt-split-attention")
+
device = get_optimal_device()
batch_cond_uncond = cmd_opts.always_batch_cond_uncond or not (cmd_opts.lowvram or cmd_opts.medvram)
|