diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-10-08 13:29:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-08 13:29:59 +0000 |
commit | 48feae37ff36915df9a3502a0a5aa1b7f146ab14 (patch) | |
tree | 698e1ad35b2ee6d528ece2f9cdadc96aa22d3e54 /modules/shared.py | |
parent | 5f85a74b00c0154bfd559dc67edfa7e30342b7c9 (diff) | |
parent | 970de9ee6891ff586821d0d80dde01c2f6c681b3 (diff) | |
download | stable-diffusion-webui-gfx803-48feae37ff36915df9a3502a0a5aa1b7f146ab14.tar.gz stable-diffusion-webui-gfx803-48feae37ff36915df9a3502a0a5aa1b7f146ab14.tar.bz2 stable-diffusion-webui-gfx803-48feae37ff36915df9a3502a0a5aa1b7f146ab14.zip |
Merge pull request #1851 from C43H66N12O12S2/flash
xformers attention
Diffstat (limited to 'modules/shared.py')
-rw-r--r-- | modules/shared.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/shared.py b/modules/shared.py index 475d7e52..d68df751 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -43,6 +43,7 @@ parser.add_argument("--realesrgan-models-path", type=str, help="Path to director parser.add_argument("--scunet-models-path", type=str, help="Path to directory with ScuNET model file(s).", default=os.path.join(models_path, 'ScuNET'))
parser.add_argument("--swinir-models-path", type=str, help="Path to directory with SwinIR model file(s).", default=os.path.join(models_path, 'SwinIR'))
parser.add_argument("--ldsr-models-path", type=str, help="Path to directory with LDSR model file(s).", default=os.path.join(models_path, 'LDSR'))
+parser.add_argument("--disable-opt-xformers-attention", action='store_true', help="force-disables xformers attention optimization")
parser.add_argument("--opt-split-attention", action='store_true', help="force-enables cross-attention layer optimization. By default, it's on for torch.cuda and off for other torch devices.")
parser.add_argument("--disable-opt-split-attention", action='store_true', help="force-disables cross-attention layer optimization")
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")
@@ -73,7 +74,7 @@ device = devices.device batch_cond_uncond = cmd_opts.always_batch_cond_uncond or not (cmd_opts.lowvram or cmd_opts.medvram)
parallel_processing_allowed = not cmd_opts.lowvram and not cmd_opts.medvram
-
+xformers_available = False
config_filename = cmd_opts.ui_settings_file
hypernetworks = hypernetwork.load_hypernetworks(os.path.join(models_path, 'hypernetworks'))
|