Modify Attention implementation for finer control
mainFor more granular control, you can replace specific attention processors in your model source code. For example, in Mochi models, you can replace the MochiAttnProcessor2_0 from diffusers with a custom attention class.
HunyuanVideo Workaround:
Because HunyuanVideo uses attention_mask (which sageattn does not support), you must modify the official attention implementation to split text tokens from image tokens. Apply SageAttention only to the large, mask-free image-token self-attention, while keeping the masked text part on SDPA or FlashAttention.