From f86d2b84a09dd382887a7c300aadcfccec76c3fe Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Sun, 27 Jul 2025 15:34:57 +0300 Subject: [PATCH] Update nodes.py --- nodes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nodes.py b/nodes.py index aa52baf..b2b44b3 100644 --- a/nodes.py +++ b/nodes.py @@ -2997,6 +2997,8 @@ class WanVideoEncode: log.warning(f"Image size {W}x{H} is not divisible by 16, resizing to {new_width}x{new_height}") image = common_upscale(image.movedim(-1, 1), new_width, new_height, "lanczos", "disabled").movedim(1, -1) + if image.shape[-1] == 4: + image = image[..., :3] image = image.to(vae.dtype).to(device).unsqueeze(0).permute(0, 4, 1, 2, 3) # B, C, T, H, W