From 9ad66015f79abb44e17b307ad885550d6a1564d2 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Wed, 15 Apr 2026 01:28:08 +0300 Subject: [PATCH] Update nodes_sam3.py --- comfy_extras/nodes_sam3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comfy_extras/nodes_sam3.py b/comfy_extras/nodes_sam3.py index 1326452f1..56cbafbc6 100644 --- a/comfy_extras/nodes_sam3.py +++ b/comfy_extras/nodes_sam3.py @@ -429,7 +429,7 @@ class SAM3_TrackPreview(io.ComfyNode): grid_y = torch.arange(H, device=gpu).view(1, H, 1) grid_x = torch.arange(W, device=gpu).view(1, 1, W) for t in range(N): - if images is not None: + if images is not None and t < images.shape[0]: frame = images[t].clone() else: frame = torch.zeros(H, W, 3)