From 42054724b71daddf19256944d1d1b09dac1c485e Mon Sep 17 00:00:00 2001 From: Igor Zinovyev Date: Tue, 2 Sep 2025 14:32:01 +0300 Subject: [PATCH] Moved dimension update to where the count is initialized. --- wanvideo/modules/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wanvideo/modules/model.py b/wanvideo/modules/model.py index a4c3b06..fa1c40b 100644 --- a/wanvideo/modules/model.py +++ b/wanvideo/modules/model.py @@ -2024,9 +2024,9 @@ class WanModel(torch.nn.Module): end_ref_latent = s2v_ref_latent.squeeze(0) elif phantom_ref is not None: end_ref_latent = phantom_ref - F += end_ref_latent_frames if end_ref_latent is not None: end_ref_latent_frames = end_ref_latent.size(1) + F += end_ref_latent_frames end_ref_latent = self.original_patch_embedding(end_ref_latent.unsqueeze(0).to(torch.float32)).to(x[0].dtype) end_ref_latent = end_ref_latent.flatten(2).transpose(1, 2) if cond_mask_weight is not None: