From 7cb46ca8c37a9e32c494a7cd6397f9e2a0548751 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Wed, 10 Sep 2025 16:09:44 +0300 Subject: [PATCH] Allow Uni3C to work with T2V --- wanvideo/modules/model.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wanvideo/modules/model.py b/wanvideo/modules/model.py index 995828a..d9cc3dd 100644 --- a/wanvideo/modules/model.py +++ b/wanvideo/modules/model.py @@ -1971,6 +1971,8 @@ class WanModel(torch.nn.Module): #uni3c controlnet if pcd_data is not None: hidden_states = x[0].unsqueeze(0).clone().float() + if hidden_states.shape[1] == 16: #T2V work around + hidden_states = torch.cat([hidden_states, torch.zeros_like(hidden_states[:, :4])], dim=1) render_latent = torch.cat([hidden_states[:, :20], pcd_data["render_latent"].to(x[0].dtype)], dim=1) # embeddings