From c254ae4235de63bba553ef7eacbeabd8fcba32b9 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Wed, 10 Sep 2025 16:47:13 +0300 Subject: [PATCH] Rather interpolate any Uni3C input frame count differences --- 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 639012c..adc9376 100644 --- a/wanvideo/modules/model.py +++ b/wanvideo/modules/model.py @@ -1975,7 +1975,7 @@ class WanModel(torch.nn.Module): if hidden_states.shape[1] == 16: #T2V work around hidden_states = torch.cat([hidden_states, torch.zeros_like(hidden_states[:, :4])], dim=1) if render_latent.shape[2] != hidden_states.shape[2]: - render_latent = torch.cat([render_latent, render_latent[:, :, :1]], dim=2) + render_latent = torch.nn.functional.interpolate(render_latent, size=(hidden_states.shape[2], render_latent.shape[3], render_latent.shape[4]), mode='trilinear', align_corners=False) render_latent = torch.cat([hidden_states[:, :20], render_latent], dim=1) # embeddings