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

This commit is contained in:
comfyanonymous 2025-03-28 08:40:25 -04:00
parent a40fcfc2d5
commit 2d17d8910c

View File

@ -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]