Rather interpolate any Uni3C input frame count differences

This commit is contained in:
kijai
2025-09-10 16:47:13 +03:00
parent dd36ab46c6
commit c254ae4235
+1 -1
View File
@@ -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