From e14d64d1d409cb28e6b7de4c384fb40d89864504 Mon Sep 17 00:00:00 2001 From: iHeyTang Date: Wed, 20 Aug 2025 14:07:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E5=90=8D=E5=92=8C=E5=B0=8F=E9=83=A8=E4=BB=B6=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91=EF=BC=8C=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E4=B8=8D=E5=BF=85=E8=A6=81=E7=9A=84=E5=B0=8F=E5=86=99=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2=EF=BC=8C=E7=A1=AE=E4=BF=9D=E6=95=B0=E6=8D=AE=E4=B8=80?= =?UTF-8?q?=E8=87=B4=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workflow_service/comfy/comfy_workflow.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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":