diff --git a/comfy_extras/nodes_wan.py b/comfy_extras/nodes_wan.py index 483502ae6..f80e7c327 100644 --- a/comfy_extras/nodes_wan.py +++ b/comfy_extras/nodes_wan.py @@ -544,7 +544,7 @@ class WanTrackToVideo: lat_h = height // 8 lat_w = width // 8 - msk = torch.ones(1, latent.shape[2], lat_h, lat_w, device=start_image.device) + msk = torch.ones(1, length - 1, lat_h, lat_w, device=start_image.device) msk[:, 1:] = 0 # repeat first frame 4 times