check for ampere
This commit is contained in:
parent
7e639cd498
commit
017b6b8744
|
@ -22,7 +22,8 @@ def apply_optimizations():
|
|||
undo_optimizations()
|
||||
|
||||
ldm.modules.diffusionmodules.model.nonlinearity = silu
|
||||
if cmd_opts.xformers and shared.xformers_available and not torch.version.hip:
|
||||
if cmd_opts.xformers and shared.xformers_available and torch.version.cuda:
|
||||
if torch.cuda.get_device_capability(shared.device) == (8, 6):
|
||||
ldm.modules.attention.CrossAttention.forward = sd_hijack_optimizations.xformers_attention_forward
|
||||
ldm.modules.diffusionmodules.model.AttnBlock.forward = sd_hijack_optimizations.xformers_attnblock_forward
|
||||
elif cmd_opts.opt_split_attention_v1:
|
||||
|
|
Loading…
Reference in New Issue