mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-23 04:40:15 +08:00
Bug fix for a crash occurring under specific conditions when handling muted nodes that were already present.
This commit is contained in:
parent
2ca43c3ace
commit
a1298fe31e
@ -81,7 +81,12 @@ def exception_helper(unique_id, input_data_all, executed, outputs, task):
|
|||||||
return executed, False, error_details, ex
|
return executed, False, error_details, ex
|
||||||
|
|
||||||
|
|
||||||
def is_incomplete_input_slots(inputs, outputs):
|
def is_incomplete_input_slots(class_def, inputs, outputs):
|
||||||
|
required_inputs = set(class_def.INPUT_TYPES().get("required", []))
|
||||||
|
|
||||||
|
if len(required_inputs - inputs.keys()) > 0:
|
||||||
|
return True
|
||||||
|
|
||||||
for x in inputs:
|
for x in inputs:
|
||||||
input_data = inputs[x]
|
input_data = inputs[x]
|
||||||
|
|
||||||
@ -150,7 +155,7 @@ def worklist_execute(server, prompt, outputs, extra_data, prompt_id, outputs_ui,
|
|||||||
if unique_id in outputs:
|
if unique_id in outputs:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if is_incomplete_input_slots(inputs, outputs):
|
if is_incomplete_input_slots(class_def, inputs, outputs):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
input_data_all = None
|
input_data_all = None
|
||||||
@ -162,7 +167,8 @@ def worklist_execute(server, prompt, outputs, extra_data, prompt_id, outputs_ui,
|
|||||||
if input_data_all is None:
|
if input_data_all is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
add_work(unique_id) # add to seed if all input is properly provided
|
if not is_incomplete_input_slots(class_def, prompt[unique_id]['inputs'], outputs):
|
||||||
|
add_work(unique_id) # add to seed if all input is properly provided
|
||||||
|
|
||||||
result = exception_helper(unique_id, input_data_all, executed, outputs, task)
|
result = exception_helper(unique_id, input_data_all, executed, outputs, task)
|
||||||
if result is not None:
|
if result is not None:
|
||||||
@ -209,7 +215,8 @@ def worklist_execute(server, prompt, outputs, extra_data, prompt_id, outputs_ui,
|
|||||||
# If all input slots are not completed, do not add to the work.
|
# If all input slots are not completed, do not add to the work.
|
||||||
# This prevents duplicate entries of the same work in the worklist.
|
# This prevents duplicate entries of the same work in the worklist.
|
||||||
# For loop support, it is important to fire only once when the input slot is completed.
|
# For loop support, it is important to fire only once when the input slot is completed.
|
||||||
if not is_incomplete_input_slots(prompt[next_node]['inputs'], outputs):
|
next_class_def = get_class_def(prompt, next_node)
|
||||||
|
if not is_incomplete_input_slots(next_class_def, prompt[next_node]['inputs'], outputs):
|
||||||
add_work(next_node)
|
add_work(next_node)
|
||||||
|
|
||||||
return executed, True, None, None
|
return executed, True, None, None
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user