Update sd_hijack.py
This commit is contained in:
parent
5303df2428
commit
5e3ff846c5
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ def apply_optimizations():
|
|||
elif cmd_opts.opt_split_attention:
|
||||
ldm.modules.attention_CrossAttention_forward = sd_hijack_optimizations.split_cross_attention_forward
|
||||
ldm.modules.diffusionmodules.model.AttnBlock.forward = sd_hijack_optimizations.cross_attention_attnblock_forward
|
||||
elif not cmd_opts.disable_opt_xformers_attention and not cmd_opts.opt_split_attention:
|
||||
elif not cmd_opts.disable_opt_xformers_attention and not (cmd_opts.opt_split_attention or torch.version.hip):
|
||||
ldm.modules.attention.CrossAttention.forward = sd_hijack_optimizations.xformers_attention_forward
|
||||
ldm.modules.attention.CrossAttention._maybe_init = sd_hijack_optimizations._maybe_init
|
||||
ldm.modules.attention.CrossAttention.attention_op = None
|
||||
|
|
Loading…
Reference in a new issue