From 96fb0f3afea01ffb773a9d2faed26178ffd18478 Mon Sep 17 00:00:00 2001 From: Mr_Dwj Date: Thu, 12 Feb 2026 23:51:56 +0800 Subject: [PATCH 1/3] fix: unpack Resample38 output --- diffsynth/models/wan_video_vae.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/diffsynth/models/wan_video_vae.py b/diffsynth/models/wan_video_vae.py index 3c2181a..b77f75c 100644 --- a/diffsynth/models/wan_video_vae.py +++ b/diffsynth/models/wan_video_vae.py @@ -469,7 +469,7 @@ class Down_ResidualBlock(nn.Module): def forward(self, x, feat_cache=None, feat_idx=[0]): x_copy = x.clone() for module in self.downsamples: - x = module(x, feat_cache, feat_idx) + x, feat_cache, feat_idx = module(x, feat_cache, feat_idx) return x + self.avg_shortcut(x_copy), feat_cache, feat_idx @@ -506,7 +506,7 @@ class Up_ResidualBlock(nn.Module): def forward(self, x, feat_cache=None, feat_idx=[0], first_chunk=False): x_main = x.clone() for module in self.upsamples: - x_main = module(x_main, feat_cache, feat_idx) + x_main, feat_cache, feat_idx = module(x_main, feat_cache, feat_idx) if self.avg_shortcut is not None: x_shortcut = self.avg_shortcut(x, first_chunk) return x_main + x_shortcut From bd3c5822a1f9fda25163796ba74c139113b963a4 Mon Sep 17 00:00:00 2001 From: Mr_Dwj Date: Fri, 13 Feb 2026 01:13:08 +0800 Subject: [PATCH 2/3] fix: WanVAE2.2 decode error --- diffsynth/models/wan_video_vae.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/diffsynth/models/wan_video_vae.py b/diffsynth/models/wan_video_vae.py index b77f75c..19ab6bd 100644 --- a/diffsynth/models/wan_video_vae.py +++ b/diffsynth/models/wan_video_vae.py @@ -509,7 +509,7 @@ class Up_ResidualBlock(nn.Module): x_main, feat_cache, feat_idx = module(x_main, feat_cache, feat_idx) if self.avg_shortcut is not None: x_shortcut = self.avg_shortcut(x, first_chunk) - return x_main + x_shortcut + return x_main + x_shortcut, feat_cache, feat_idx else: return x_main, feat_cache, feat_idx @@ -1336,6 +1336,7 @@ class VideoVAE38_(VideoVAE_): x = self.conv2(z) for i in range(iter_): self._conv_idx = [0] + # breakpoint() if i == 0: out, self._feat_map, self._conv_idx = self.decoder(x[:, :, i:i + 1, :, :], feat_cache=self._feat_map, From fc11fd42974bc5bda57160a687aab41553bd2d85 Mon Sep 17 00:00:00 2001 From: Mr_Dwj Date: Fri, 13 Feb 2026 09:38:14 +0800 Subject: [PATCH 3/3] chore: remove invalid comment code --- diffsynth/models/wan_video_vae.py | 1 - 1 file changed, 1 deletion(-) diff --git a/diffsynth/models/wan_video_vae.py b/diffsynth/models/wan_video_vae.py index 19ab6bd..3d5db68 100644 --- a/diffsynth/models/wan_video_vae.py +++ b/diffsynth/models/wan_video_vae.py @@ -1336,7 +1336,6 @@ class VideoVAE38_(VideoVAE_): x = self.conv2(z) for i in range(iter_): self._conv_idx = [0] - # breakpoint() if i == 0: out, self._feat_map, self._conv_idx = self.decoder(x[:, :, i:i + 1, :, :], feat_cache=self._feat_map,