diff options
author | yfszzx <yfszzx@gmail.com> | 2022-10-16 04:34:05 +0000 |
---|---|---|
committer | yfszzx <yfszzx@gmail.com> | 2022-10-16 04:34:05 +0000 |
commit | 5d8c59eee505cf15ec6994d05bb941440d90e44e (patch) | |
tree | a87f6e38d4dc33e3f293f10f9cdd1760af93114c /modules/sd_hijack.py | |
parent | 763b893f319cee280b86e63025eb55e7c16b02e7 (diff) | |
parent | d41ac174e24e1e7cdcf7b42f2a03cbc6394eb5e5 (diff) | |
download | stable-diffusion-webui-gfx803-5d8c59eee505cf15ec6994d05bb941440d90e44e.tar.gz stable-diffusion-webui-gfx803-5d8c59eee505cf15ec6994d05bb941440d90e44e.tar.bz2 stable-diffusion-webui-gfx803-5d8c59eee505cf15ec6994d05bb941440d90e44e.zip |
Merge branch 'master' of https://github.com/yfszzx/stable-diffusion-webui-plus
Diffstat (limited to 'modules/sd_hijack.py')
-rw-r--r-- | modules/sd_hijack.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/sd_hijack.py b/modules/sd_hijack.py index c81722a0..984b35c4 100644 --- a/modules/sd_hijack.py +++ b/modules/sd_hijack.py @@ -24,7 +24,7 @@ def apply_optimizations(): ldm.modules.diffusionmodules.model.nonlinearity = silu
- if cmd_opts.force_enable_xformers or (cmd_opts.xformers and shared.xformers_available and torch.version.cuda and (6, 0) <= torch.cuda.get_device_capability(shared.device) <= (8, 6)):
+ if cmd_opts.force_enable_xformers or (cmd_opts.xformers and shared.xformers_available and torch.version.cuda and (6, 0) <= torch.cuda.get_device_capability(shared.device) <= (9, 0)):
print("Applying xformers cross attention optimization.")
ldm.modules.attention.CrossAttention.forward = sd_hijack_optimizations.xformers_attention_forward
ldm.modules.diffusionmodules.model.AttnBlock.forward = sd_hijack_optimizations.xformers_attnblock_forward
|