From 6d1a3f7d00d92b652b986ef69b4337ea0f208a1a Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Sun, 15 Dec 2024 08:41:35 -0500 Subject: [PATCH] Fix case of ExecutionBlocker not handled correctly with INPUT_IS_LIST. --- execution.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/execution.py b/execution.py index b5746362..7c42911b 100644 --- a/execution.py +++ b/execution.py @@ -144,11 +144,16 @@ def slice_dict(d, i): return {k: v[i if len(v) > i else -1] for k, v in d.items()} results = [] - def process_inputs(inputs, index=None): + def process_inputs(inputs, index=None, input_is_list=False): if allow_interrupt: nodes.before_node_execution() execution_block = None for k, v in inputs.items(): + if input_is_list: + for e in v: + if isinstance(e, ExecutionBlocker): + v = e + break if isinstance(v, ExecutionBlocker): execution_block = execution_block_cb(v) if execution_block_cb else v break @@ -160,7 +165,7 @@ def process_inputs(inputs, index=None): results.append(execution_block) if input_is_list: - process_inputs(input_data_all, 0) + process_inputs(input_data_all, 0, input_is_list=input_is_list) elif max_len_input == 0: process_inputs({}) else: