字节跳动:种子 2.0
输入图像或视频进行分析。接收描述视觉内容、推理和结构化信息提取的详细文本输出。
简介
Seed 2.0 is a vision-language model behind a ComfyUI node: attach an image, ask a question, and the answer comes back as text. The shipped graph asks for exactly two keys — positive_prompt and negative_prompt — extracts them with JsonExtractString and shows them, which turns the template into a prompt writer for another image workflow.
Graph: LoadImage -> ByteDanceSeedNode (model Seed 2.0 Pro, prompt, system_prompt, seed) -> PreviewAny, then RegexReplace strips any code fence and JsonExtractString pulls positive_prompt and negative_prompt out of the JSON, each into its own PreviewAny.
Output is text only: nothing renders to an image or a video, so this record ships the graph pair and card art but no example and no runnable form. Runs through the ByteDance partner API node.
你需要提供
- 正在读取工作流
在 ComfyUI 中运行。 此工作流无法在本页面运行。请下载后在 ComfyUI 中打开。
下载工作流此工作流暂无示例输出。
查看工作流内部
节点图的只读预览。在 Comfy Cloud 中打开或下载后即可编辑节点。
Loading the graph
Open full-size workflow preview- 输出
- 文本
- 作者
- 作者信息暂不可用
需要自定义节点
- 正在读取工作流
通过代码使用此工作流
尽可能根据工作流图和输入自动生成代码,否则显示已保存的示例。运行代码可能产生费用,请先核对凭据和端点。
What you need
- Runs on
- Comfy Cloud
- 密钥
- COMFY_API_KEY
需要付费的 Cloud 方案和额度。
# Python 3.10+: pip install comfy-sdk==0.4.0
import os
from comfy_sdk import Comfy
api_key = os.environ.get("COMFY_API_KEY", "").strip()
if not api_key: raise RuntimeError("Set COMFY_API_KEY")
os.environ.setdefault("COMFY_BASE_URL", "https://cloud.comfy.org")
client = Comfy(api_key=api_key)
workflow = client.workflows.from_json({
"1": {
"class_type": "ByteDanceSeedNode",
"inputs": {
"model": "Seed 2.0 Pro",
"model.images.image_1": [
"3",
0
],
"model.temperature": 1,
"prompt": "Thoroughly analyze every visual detail of the reference picture, reverse deduce the full original generation prompt.\nClassify content reasonably, finally output strictly in standard JSON format only, no extra text,\nkey: \"positive_prompt\", \"negative_prompt\".",
"seed": 2135571041,
"system_prompt": ""
},
"_meta": {
"title": "ByteDance Seed"
}
},
"2": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"1",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"3": {
"class_type": "LoadImage",
"inputs": {
"image": "angle_3.png"
},
"_meta": {
"title": "Load Image"
}
},
"5": {
"class_type": "RegexReplace",
"inputs": {
"case_insensitive": False,
"count": 1,
"dotall": False,
"multiline": False,
"regex_pattern": "^```(?:json)?\\s*\\n?",
"replace": "",
"string": [
"2",
0
]
},
"_meta": {
"title": "Replace Text (Regex)"
}
},
"6": {
"class_type": "RegexReplace",
"inputs": {
"case_insensitive": False,
"count": 1,
"dotall": False,
"multiline": False,
"regex_pattern": "\\n?```\\s*$",
"replace": "",
"string": [
"5",
0
]
},
"_meta": {
"title": "Replace Text (Regex)"
}
},
"7": {
"class_type": "JsonExtractString",
"inputs": {
"json_string": [
"6",
0
],
"key": "negative_prompt"
},
"_meta": {
"title": "Extract Text from JSON"
}
},
"8": {
"class_type": "JsonExtractString",
"inputs": {
"json_string": [
"6",
0
],
"key": "positive_prompt"
},
"_meta": {
"title": "Extract Text from JSON"
}
},
"9": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"7",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"10": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"8",
0
]
},
"_meta": {
"title": "Preview as Text"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)