From 9ebb89b603e52c284ae3d6d9a759378bfc4e438e Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 28 Dec 2025 16:43:31 +0700 Subject: [PATCH] feat: Enable `forceInput` for the trigger, set `INPUT_IS_LIST` to true, and update `execute_with_trigger` to handle list inputs while clarifying unrolling behavior. --- load_image_sequence.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/load_image_sequence.py b/load_image_sequence.py index d540fdd..2d8daed 100644 --- a/load_image_sequence.py +++ b/load_image_sequence.py @@ -106,22 +106,32 @@ class BatchLoadImageSequenceWithTrigger(BatchLoadImageSequence): @classmethod def INPUT_TYPES(cls): inputs = BatchLoadImageSequence.INPUT_TYPES() + # Move to optional but with forceInput to allow any connection inputs["optional"] = { - "trigger": ("*", {}), # Any type trigger + "trigger": ("*", {"forceInput": True}), # Any type trigger } return inputs RETURN_TYPES = ("IMAGE", "INT") FUNCTION = "execute_with_trigger" + INPUT_IS_LIST = True DESCRIPTION = """ Same as BatchLoadImageSequence but with an optional trigger input. - Connect any output to `trigger` to force this node to wait. - Useful for ensuring a process finishes before loading starts. +- This node will NOT unroll (run multiple times) if the trigger is a list. """ def execute_with_trigger(self, path_pattern, start_index, frame_count, ignore_missing_images, trigger=None): - return self.execute(path_pattern, start_index, frame_count, ignore_missing_images) + # When INPUT_IS_LIST is True, all inputs are passed as lists. + # We extract the single values from the standard inputs. + return self.execute( + path_pattern[0], + start_index[0], + frame_count[0], + ignore_missing_images[0] + ) NODE_CLASS_MAPPINGS = {