aboutsummaryrefslogtreecommitdiff
path: root/modules/shared.py
diff options
context:
space:
mode:
authorPam <pamhome21@gmail.com>2023-03-07 00:33:13 +0500
committerPam <pamhome21@gmail.com>2023-03-07 00:33:13 +0500
commitfec0a895119a124a295e3dad5205de5766031dc7 (patch)
tree000a8ea99831b164435454761d1e24830317bc89 /modules/shared.py
parent0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8 (diff)
scaled dot product attention
Diffstat (limited to 'modules/shared.py')
-rw-r--r--modules/shared.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/shared.py b/modules/shared.py
index 805f9cc1..12d0756b 100644
--- a/modules/shared.py
+++ b/modules/shared.py
@@ -69,6 +69,7 @@ parser.add_argument("--sub-quad-kv-chunk-size", type=int, help="kv chunk size fo
parser.add_argument("--sub-quad-chunk-threshold", type=int, help="the percentage of VRAM threshold for the sub-quadratic cross-attention layer optimization to use chunking", default=None)
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("--opt-sdp-attention", action='store_true', help="enable scaled dot product cross-attention layer optimization; requires PyTorch 2.*")
parser.add_argument("--disable-opt-split-attention", action='store_true', help="force-disables cross-attention layer optimization")
parser.add_argument("--disable-nan-check", action='store_true', help="do not check if produced images/latent spaces have nans; useful for running without a checkpoint in CI")
parser.add_argument("--use-cpu", nargs='+', help="use CPU as torch device for specified modules", default=[], type=str.lower)