From 82ecb02c1ed29455047dcaa3839497b2cfa92852 Mon Sep 17 00:00:00 2001 From: catboxanon <122327233+catboxanon@users.noreply.github.com> Date: Sun, 29 Dec 2024 20:06:49 -0500 Subject: [PATCH] Remove duplicate calls to INPUT_TYPES (#6249) --- comfy_execution/graph.py | 4 ++-- execution.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/comfy_execution/graph.py b/comfy_execution/graph.py index cc6caffd..59b42b74 100644 --- a/comfy_execution/graph.py +++ b/comfy_execution/graph.py @@ -54,8 +54,8 @@ class DynamicPrompt: def get_original_prompt(self): return self.original_prompt -def get_input_info(class_def, input_name): - valid_inputs = class_def.INPUT_TYPES() +def get_input_info(class_def, input_name, valid_inputs=None): + valid_inputs = valid_inputs or class_def.INPUT_TYPES() input_info = None input_category = None if "required" in valid_inputs and input_name in valid_inputs["required"]: diff --git a/execution.py b/execution.py index 1c92830d..b18dc4b8 100644 --- a/execution.py +++ b/execution.py @@ -93,7 +93,7 @@ def get_input_data(inputs, class_def, unique_id, outputs=None, dynprompt=None, e missing_keys = {} for x in inputs: input_data = inputs[x] - input_type, input_category, input_info = get_input_info(class_def, x) + input_type, input_category, input_info = get_input_info(class_def, x, valid_inputs) def mark_missing(): missing_keys[x] = True input_data_all[x] = (None,) @@ -555,7 +555,7 @@ def validate_inputs(prompt, item, validated): received_types = {} for x in valid_inputs: - type_input, input_category, extra_info = get_input_info(obj_class, x) + type_input, input_category, extra_info = get_input_info(obj_class, x, class_inputs) assert extra_info is not None if x not in inputs: if input_category == "required":