Skip to content

Commit

Permalink
Fix case of ExecutionBlocker not handled correctly with INPUT_IS_LIST.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Dec 15, 2024
1 parent 1b3a650 commit 6d1a3f7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 6d1a3f7

Please sign in to comment.