From 3d9b52cb10933209153cba656695f57c73124f97 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Sun, 24 Aug 2025 14:18:54 +0300 Subject: [PATCH] Fix: can't del the end image at this point... --- nodes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nodes.py b/nodes.py index ec8612c..f8fa2d8 100644 --- a/nodes.py +++ b/nodes.py @@ -890,7 +890,7 @@ class WanVideoImageToVideoEncode: elif start_image is None and end_image is not None: zero_frames = torch.zeros(3, num_frames-end_image.shape[0], H, W, device=device, dtype=vae.dtype) concatenated = torch.cat([zero_frames, resized_end_image.to(device, dtype=vae.dtype)], dim=1) - del resized_end_image, zero_frames + del zero_frames elif start_image is None and end_image is None: concatenated = torch.zeros(3, num_frames, H, W, device=device, dtype=vae.dtype) else: @@ -899,7 +899,7 @@ class WanVideoImageToVideoEncode: else: zero_frames = torch.zeros(3, num_frames-1, H, W, device=device, dtype=vae.dtype) concatenated = torch.cat([resized_start_image.to(device, dtype=vae.dtype), zero_frames, resized_end_image.to(device, dtype=vae.dtype)], dim=1) - del resized_start_image, resized_end_image, zero_frames + del resized_start_image, zero_frames else: temporal_mask = common_upscale(temporal_mask.unsqueeze(1), W, H, "nearest", "disabled").squeeze(1) concatenated = resized_start_image[:,:num_frames] * temporal_mask[:num_frames].unsqueeze(0)