diff --git a/workflow_service/comfy/comfy_workflow.py b/workflow_service/comfy/comfy_workflow.py index 3cf78a4..fc86889 100644 --- a/workflow_service/comfy/comfy_workflow.py +++ b/workflow_service/comfy/comfy_workflow.py @@ -52,7 +52,7 @@ def parse_api_spec(workflow_data: dict) -> Dict[str, Dict[str, Any]]: if title.startswith(API_INPUT_PREFIX): # 提取节点名(去掉API_INPUT_PREFIX前缀) - node_name = title[len(API_INPUT_PREFIX) :].lower() + node_name = title[len(API_INPUT_PREFIX) :] # 如果节点名不在inputs中,创建新的节点条目 if node_name not in spec["inputs"]: @@ -64,7 +64,7 @@ def parse_api_spec(workflow_data: dict) -> Dict[str, Dict[str, Any]]: if "inputs" in node: for a_input in node.get("inputs", []): if a_input.get("link") is None and "widget" in a_input: - widget_name = a_input["widget"]["name"].lower() + widget_name = a_input["widget"]["name"] # 特殊处理:隐藏LoadImage节点的upload字段 if node.get("type") == "LoadImage" and widget_name == "upload": @@ -82,7 +82,7 @@ def parse_api_spec(workflow_data: dict) -> Dict[str, Dict[str, Any]]: elif title.startswith(API_OUTPUT_PREFIX): # 提取节点名(去掉API_OUTPUT_PREFIX前缀) - node_name = title[len(API_OUTPUT_PREFIX) :].lower() + node_name = title[len(API_OUTPUT_PREFIX) :] # 如果节点名不在outputs中,创建新的节点条目 if node_name not in spec["outputs"]: @@ -93,7 +93,7 @@ def parse_api_spec(workflow_data: dict) -> Dict[str, Dict[str, Any]]: if "outputs" in node: for an_output in node.get("outputs", []): - output_name = an_output["name"].lower() + output_name = an_output["name"] # 确保outputs字段存在 if "outputs" not in spec["outputs"][node_name]: @@ -139,7 +139,7 @@ def parse_inputs_json_schema(workflow_data: dict) -> dict: if title.startswith(API_INPUT_PREFIX): # 提取节点名(去掉API_INPUT_PREFIX前缀) - node_name = title[len(API_INPUT_PREFIX) :].lower() + node_name = title[len(API_INPUT_PREFIX) :] if node_name not in input_nodes: input_nodes[node_name] = { @@ -152,7 +152,7 @@ def parse_inputs_json_schema(workflow_data: dict) -> dict: if "inputs" in node: for a_input in node.get("inputs", []): if a_input.get("link") is None and "widget" in a_input: - widget_name = a_input["widget"]["name"].lower() + widget_name = a_input["widget"]["name"] # 特殊处理:隐藏LoadImage节点的upload字段 if node.get("type") == "LoadImage" and widget_name == "upload":