Skip to content

Commit 3c71a0d

Browse files
committed
Make missing input error prettier for dynamic types
1 parent c2b98d0 commit 3c71a0d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

execution.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ async def validate_inputs(prompt_id, prompt, item, validated):
760760
if issubclass(obj_class, _ComfyNodeInternal):
761761
obj_class: _io._ComfyNodeBaseInternal
762762
class_inputs = obj_class.INPUT_TYPES()
763-
class_inputs, _, _ = _io.get_finalized_class_inputs(class_inputs, inputs)
763+
class_inputs, _, v3_data = _io.get_finalized_class_inputs(class_inputs, inputs)
764764
validate_function_name = "validate_inputs"
765765
validate_function = first_real_override(obj_class, validate_function_name)
766766
else:
@@ -780,10 +780,11 @@ async def validate_inputs(prompt_id, prompt, item, validated):
780780
assert extra_info is not None
781781
if x not in inputs:
782782
if input_category == "required":
783+
details = f"{x}" if not v3_data else x.split(".")[-1]
783784
error = {
784785
"type": "required_input_missing",
785786
"message": "Required input is missing",
786-
"details": f"{x}",
787+
"details": details,
787788
"extra_info": {
788789
"input_name": x
789790
}

0 commit comments

Comments
 (0)