mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
increase the min lenghts for SDNQ atten
This commit is contained in:
@@ -24,7 +24,7 @@ def set_sdnq_attention():
|
||||
sdpa_pre_sdnq_atten = torch.nn.functional.scaled_dot_product_attention
|
||||
@wraps(sdpa_pre_sdnq_atten)
|
||||
def sdpa_sdnq_atten(query: torch.FloatTensor, key: torch.FloatTensor, value: torch.FloatTensor, attn_mask: torch.Tensor | None = None, dropout_p: float = 0.0, is_causal: bool = False, scale: float | None = None, enable_gqa: bool = False, **kwargs) -> torch.FloatTensor:
|
||||
if not is_causal and query.shape[-3] > 1: # VAE
|
||||
if not is_causal and query.shape[-1] >= 32 and query.shape[-2] >= 256 and query.shape[-3] > 1:
|
||||
return sdnq_triton_atten(
|
||||
query=query, key=key, value=value,
|
||||
attn_mask=attn_mask, scale=scale, enable_gqa=enable_gqa,
|
||||
|
||||
Reference in New Issue
Block a user