FastVideo icon indicating copy to clipboard operation
FastVideo copied to clipboard

[Feature] Causal attention

Open betterze opened this issue 4 months ago • 4 comments

Motivation

Does the method support causal attention? Although the code includes a causal flag, it appears to be unused.

https://github.com/hao-ai-lab/FastVideo/blob/main/fastvideo/attention/backends/video_sparse_attn.py#L206

Related resources

No response

betterze avatar Aug 06 '25 19:08 betterze

No it doesn't

Edenzzzz avatar Aug 06 '25 19:08 Edenzzzz

Here is an example of adding causal mask to wan https://github.com/tianweiy/CausVid/blob/master/causvid/models/wan/causal_model.py#L414.

Is there possible to combine block causal mask with sparse attention? How can I add the block causal mask?

betterze avatar Aug 06 '25 20:08 betterze

Same question

cucNaifuXue avatar Aug 11 '25 08:08 cucNaifuXue

We've added support for causal attention based on self-forcing: https://github.com/hao-ai-lab/FastVideo/pull/766

SolitaryThinker avatar Aug 29 '25 04:08 SolitaryThinker