From 38a48c670a3a4a3b26303e60d3324e1499d981f2 Mon Sep 17 00:00:00 2001 From: wangxin68 Date: Wed, 10 Dec 2025 17:27:37 +0800 Subject: [PATCH] [bugfix] Fixed the logic for processing return values after computing attention in flashAttention3 --- wanvideo/modules/attention_flash.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wanvideo/modules/attention_flash.py b/wanvideo/modules/attention_flash.py index ed8e99b..bddeb37 100644 --- a/wanvideo/modules/attention_flash.py +++ b/wanvideo/modules/attention_flash.py @@ -66,7 +66,7 @@ else: 0, dtype=torch.int32).to(q.device, non_blocking=True), seqused_q=None, seqused_k=None, max_seqlen_q=lq, max_seqlen_k=lk, softmax_scale=softmax_scale, causal=causal, - deterministic=deterministic)[0].unflatten(0, (b, lq)) + deterministic=deterministic).unflatten(0, (b, lq)) else: assert FLASH_ATTN_2_AVAILABLE x = flash_attn.flash_attn_varlen_func(q=q, k=k, v=v,