From da85c4e2d0d2f6cef56a7d296796c8268ff1eca9 Mon Sep 17 00:00:00 2001 From: Marco Date: Sat, 11 Apr 2026 00:01:49 -0300 Subject: [PATCH] Add 'indices' output to ImageListSampler node --- logic_management/image_list_sampler.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/logic_management/image_list_sampler.py b/logic_management/image_list_sampler.py index ec25db0..33746d1 100644 --- a/logic_management/image_list_sampler.py +++ b/logic_management/image_list_sampler.py @@ -8,10 +8,10 @@ class ImageListSampler: } } - RETURN_TYPES = ("IMAGE",) - RETURN_NAMES = ("sampled_images",) + RETURN_TYPES = ("IMAGE", "INT") + RETURN_NAMES = ("sampled_images", "indices") INPUT_IS_LIST = True - OUTPUT_IS_LIST = (True,) + OUTPUT_IS_LIST = (True, True) FUNCTION = "sample_images" CATEGORY = "AnotherUtils/logic" @@ -38,10 +38,10 @@ class ImageListSampler: total = len(all_frames) if cnt <= 0: - return ([],) + return ([], []) if cnt >= total: - return (all_frames,) + return (all_frames, list(range(total))) # Calculate equally spaced indices step = total / cnt @@ -49,4 +49,4 @@ class ImageListSampler: sampled = [all_frames[i] for i in indices] - return (sampled,) + return (sampled, indices)