diff options
author | 不会画画的中医不是好程序员 <yfszzx@gmail.com> | 2022-10-16 02:04:05 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-16 02:04:05 +0000 |
commit | d41ac174e24e1e7cdcf7b42f2a03cbc6394eb5e5 (patch) | |
tree | da39175c109598f17e89fafe57aac9b9597ff616 /modules/sd_hijack.py | |
parent | 6e4f5566b58e36aede83427df6c69eba8517af28 (diff) | |
parent | be1596ce30b1ead6998da0c62003003dcce5eb2c (diff) | |
download | stable-diffusion-webui-gfx803-d41ac174e24e1e7cdcf7b42f2a03cbc6394eb5e5.tar.gz stable-diffusion-webui-gfx803-d41ac174e24e1e7cdcf7b42f2a03cbc6394eb5e5.tar.bz2 stable-diffusion-webui-gfx803-d41ac174e24e1e7cdcf7b42f2a03cbc6394eb5e5.zip |
Merge branch 'AUTOMATIC1111:master' into master
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
|