位元組跳動:種子 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)