修改图片生成节点
This commit is contained in:
parent
e35664c204
commit
0eb2985724
|
|
@ -58,7 +58,8 @@ vol = modal.Volume.from_name("comfy_model", environment_name="dev", create_if_mi
|
||||||
)
|
)
|
||||||
@modal.web_server(8000, startup_timeout=120)
|
@modal.web_server(8000, startup_timeout=120)
|
||||||
def ui_1():
|
def ui_1():
|
||||||
subprocess.Popen("comfy launch -- --cpu --listen 0.0.0.0 --port 8000", shell=True)
|
process = subprocess.Popen("comfy launch -- --cpu --listen 0.0.0.0 --port 8000", shell=True)
|
||||||
|
process.wait()
|
||||||
|
|
||||||
|
|
||||||
@app.function(
|
@app.function(
|
||||||
|
|
|
||||||
|
|
@ -64,17 +64,10 @@ def fetch_and_process_image_models():
|
||||||
|
|
||||||
for model in data["data"]:
|
for model in data["data"]:
|
||||||
tech_name = model.get("model_name")
|
tech_name = model.get("model_name")
|
||||||
if not tech_name: continue
|
if not tech_name:
|
||||||
|
continue
|
||||||
# --- 核心修正:不再手动添加任何前缀 ---
|
|
||||||
|
|
||||||
# 1. 直接从API获取description,并用strip()清理首尾空格
|
|
||||||
description_from_api = str(model.get("description", tech_name)).strip()
|
description_from_api = str(model.get("description", tech_name)).strip()
|
||||||
|
|
||||||
# 2. 生成最终的显示名称 (description本身已包含前缀)
|
|
||||||
display_name = f"{description_from_api} ({tech_name})"
|
display_name = f"{description_from_api} ({tech_name})"
|
||||||
|
|
||||||
# 3. 仅根据mode分配排序键,用于内部排序
|
|
||||||
mode = model.get("mode")
|
mode = model.get("mode")
|
||||||
sort_key = 99
|
sort_key = 99
|
||||||
if mode == "t2i":
|
if mode == "t2i":
|
||||||
|
|
|
||||||
|
|
@ -234,6 +234,7 @@ class LLMUionNode:
|
||||||
|
|
||||||
return (result,)
|
return (result,)
|
||||||
|
|
||||||
|
|
||||||
# 节点映射
|
# 节点映射
|
||||||
# NODE_CLASS_MAPPINGS = {"LLMUionNode": LLMUionNode}
|
NODE_CLASS_MAPPINGS = {"LLMUionNode": LLMUionNode}
|
||||||
# NODE_DISPLAY_NAME_MAPPINGS = {"LLMUionNode": "聚合LLM节点(视频/图像/音频)"}
|
NODE_DISPLAY_NAME_MAPPINGS = {"LLMUionNode": "聚合LLM节点(视频/图像/音频)"}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue