Skip to content

Commit ca45902

Browse files
committed
Update attention.py
1 parent 6c5637c commit ca45902

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/diffusers/models/attention.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,7 @@ def set_use_memory_efficient_attention_xformers(
241241
op_fw, op_bw = attention_op
242242
dtype, *_ = op_fw.SUPPORTED_DTYPES
243243
q = torch.randn((1, 2, 40), device="cuda", dtype=dtype)
244-
try:
245-
_ = xops.memory_efficient_attention(q, q, q)
246-
except:
247-
_ = xops.ops.memory_efficient_attention(q, q, q)
244+
_ = xops.ops.memory_efficient_attention(q, q, q)
248245
except Exception as e:
249246
raise e
250247

0 commit comments

Comments
 (0)