From 9f9a8e71c2341006e3404feb7c66ea8fd45e4034 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Sat, 17 Jan 2026 20:13:43 +0200 Subject: [PATCH] Revert " Fix: Fix torch.arange bounds error in context window processing" This reverts commit 707bbcd72b60320ce0bf5d9f086d89452269f34b. --- nodes_sampler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nodes_sampler.py b/nodes_sampler.py index 76f4769..2e8f7c7 100644 --- a/nodes_sampler.py +++ b/nodes_sampler.py @@ -1986,13 +1986,13 @@ class WanVideoSampler: partial_wananim_face_pixels = partial_wananim_pose_latents = None if wananim_face_pixels is not None and partial_wananim_face_pixels is None: start = c[0] * 4 - end = c[-1] * 4 + 1 + end = c[-1] * 4 center_indices = torch.arange(start, end, 1) center_indices = torch.clamp(center_indices, min=0, max=wananim_face_pixels.shape[2] - 1) partial_wananim_face_pixels = wananim_face_pixels[:, :, center_indices].to(device, dtype) if wananim_pose_latents is not None: start = c[0] - end = c[-1] + 1 + end = c[-1] center_indices = torch.arange(start, end, 1) center_indices = torch.clamp(center_indices, min=0, max=wananim_pose_latents.shape[2] - 1) partial_wananim_pose_latents = wananim_pose_latents[:, :, center_indices][:, :, :context_frames-1].to(device, dtype)