Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Don't error if wan concat image has extra channels.

comfyanonymous2d17d8910c7d
diff --git a/comfy/model_base.py b/comfy/model_base.py
index 8f588e2bf..f55cbe183 100644
--- a/comfy/model_base.py
+++ b/comfy/model_base.py
@@ -1013,6 +1013,9 @@ class WAN21(BaseModel):
if not self.image_to_video or extra_channels == image.shape[1]:
return image
+ if image.shape[1] > (extra_channels - 4):
+ image = image[:, :(extra_channels - 4)]
+
mask = kwargs.get("concat_mask", kwargs.get("denoise_mask", None))
if mask is None:
mask = torch.zeros_like(noise)[:, :4]