mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-07-07 15:57:10 +08:00
Update attention.py
This commit is contained in:
parent
f90ec0e6e2
commit
62a5b4ee88
@ -544,7 +544,7 @@ def attention_flash(q, k, v, heads, mask=None, attn_precision=None, skip_reshape
|
|||||||
causal=False,
|
causal=False,
|
||||||
).transpose(1, 2)
|
).transpose(1, 2)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.warning("Flash Attention failed, using default SDPA: {e}")
|
logging.warning(f"Flash Attention failed, using default SDPA: {e}")
|
||||||
out = torch.nn.functional.scaled_dot_product_attention(q, k, v, attn_mask=mask, dropout_p=0.0, is_causal=False)
|
out = torch.nn.functional.scaled_dot_product_attention(q, k, v, attn_mask=mask, dropout_p=0.0, is_causal=False)
|
||||||
if not skip_output_reshape:
|
if not skip_output_reshape:
|
||||||
out = (
|
out = (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user