From 07848ab0b59e073c7c97048ff6ce6ecbbe8451b8 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Sun, 9 Mar 2025 23:26:46 +0200 Subject: [PATCH] fix --- wanvideo/modules/model.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wanvideo/modules/model.py b/wanvideo/modules/model.py index 6894966..43caf3d 100644 --- a/wanvideo/modules/model.py +++ b/wanvideo/modules/model.py @@ -182,9 +182,9 @@ class WanSelfAttention(nn.Module): ).permute(0, 2, 1, 3) #print("inner attention", x.shape) #inner attention torch.Size([1, 12, 32760, 128]) else: + q=rope_apply(q, grid_sizes, freqs) + k=rope_apply(k, grid_sizes, freqs) if is_enhance_enabled(): - q=rope_apply(q, grid_sizes, freqs) - k=rope_apply(k, grid_sizes, freqs) feta_scores = get_feta_scores(q, k) x = attention( @@ -200,7 +200,7 @@ class WanSelfAttention(nn.Module): x = self.o(x) if is_enhance_enabled(): - x *= feta_scores + x *= feta_scores return x