本机 ComfyUI 0.45.0,端口 8189(GPU 机 192.168.31.31)。以下参数取自 /object_info 实时导出,可作权威依据。
{
"id": "<uuid>",
"revision": 0,
"nodes": [
{
"id": 44, // int,同文件内唯一
"type": "XfyunLLM", // 节点类名
"pos": [x, y], "size": [w, h],
"flags": {}, "order": 3, "mode": 0,
"inputs": [{"name":"system_prompt","type":"STRING","widget":{"name":"system_prompt"},"link":5}],
"outputs": [{"name":"text","type":"STRING","links":[6],"slot_index":0}],
"widgets_values": ["spark-x2.6-4b", ...], // 顺序 = INPUT_TYPES 顺序,去掉连线输入
"title": "可选自定义标题",
"properties": {"Node name for S&R": "XfyunLLM"}
}
],
"links": [ [link_id, origin_node_id, origin_slot, target_node_id, target_slot, "TYPE"], ... ],
"groups": [], "config": {}, "extra": {}, "version": 0.4
}
要点:
links 是数组的数组,6 元组,link_id 全局唯一(int)。inputs 里加/改一项: {"name": <参数名>, "type": <类型>, "widget": {"name": <参数名>}, "link": <link_id>}, 并在 links 里加一条指向该 target_slot(= 该项在 inputs 数组中的索引)。 该参数在 widgets_values 里的占位值要保留(前端靠位置对齐),不能删。outputs[i].links 增加 link_id,目标节点 inputs[j].link 设为该 id。| 输入 | 类型 | 约束 |
|---|---|---|
| clip | CLIP | 必填连线 |
| vae | VAE | 必填连线 |
| prompt | STRING (multiline) | 必填连线(第 2 号输出即 conditioning) |
| width | INT | 32~16384,step 32 |
| height | INT | 32~16384,step 32 |
| length | INT | min 5, max 3600, step 17,tooltip 原文:Frame count at 24 fps, snapped up to the model's 17k+5 grid (124 = ~5s; trained range is ~124-362, longer is untested) |
| first_frame / last_frame | IMAGE | 可选 |
输出:CONDITIONING(positive)、LATENT。 当前工作流取值 length = 192(= 24fps × 8s,恰好落在 17k+5 网格:17×11+5)。
| 输入 | 类型 | 约束 |
|---|---|---|
| images | IMAGE | 必填 |
| fps | FLOAT | 1~120,step 1,默认 30 |
| audio | AUDIO | 可选 |
| bit_depth | COMBO | 默认 auto(另有 8-bit / 10-bit) |
| color_space | COMBO | 默认 sRGB |
| chroma_subsampling | COMBO | 默认 auto |
| codec | COMBO | 默认 none |
该节点没有「秒数」参数。视频时长 = 帧数 ÷ fps,由上游帧数决定。
⚠️ 现有工作流的 widgets_values 是 [24.0, 8]:第一个是 fps=24.0,第二个 8 是旧版工作流残留值,实际被解析成 bit_depth=8(实测在跑的任务里 CreateVideo.inputs = {fps: 24.0, bit_depth: 8, ...})。它与时长无关。
| 输入 | 类型 | 约束 |
|---|---|---|
| prompt | STRING | forceInput(必须连线) |
| duration | FLOAT | 3.0~15.0,step 0.1,默认 8.0 |
| fix_timestamps | BOOLEAN | 默认 true |
输出:prompt(STRING)、ok(BOOLEAN)、report(STRING)。
| 输入 | 类型 | 说明 |
|---|---|---|
| string | STRING (multiline) | 被替换文本,可连线 |
| find | STRING (multiline) | 查找串,widget |
| replace | STRING (multiline) | 替换串,可连线 |
输出:STRING。现有 42 号:find = "{input text}",string ← 41,replace ← 40。
switch(BOOLEAN) 必填;on_false / on_true 是懒加载的任意类型输入;输出 output。 现有:on_false ← 40(原文兜底)、on_true ← 45(扩写结果)、switch ← 46。
40 PrimitiveStringMultiline(任务提示词模板,含 DURATION = 8.00 seconds 与 {input text})
41 PrimitiveStringMultiline(系统提示词短版) ┐
42 StringReplace(string←41, find="{input text}", replace←40) → 44.prompt
43 PrimitiveStringMultiline(输出契约 JSON) → 44.system_prompt
44 XfyunLLM 或 TextGenerateV2(本地 9B) → 45.json_string
45 JsonExtractString(key="expanded_caption") → 47.on_true
46 PrimitiveBoolean(true) → 47.switch
47 ComfySwitchNode(on_false←40, on_true←45) → 48 PreviewAny / 49 H3PromptValidate
49 H3PromptValidate(duration=8.0) → 20.prompt
length 必须落在 17k + 5 网格(k≥1,训练区间 124~362):
| k | 帧 | 秒(24fps) |
|---|---|---|
| 7 | 124 | 5.17 |
| 8 | 141 | 5.88 |
| 9 | 158 | 6.58 |
| 10 | 175 | 7.29 |
| 11 | 192 | 8.00 |
| 12 | 209 | 8.71 |
| 13 | 226 | 9.42 |
| 14 | 243 | 10.12 |
| 15 | 260 | 10.83 |
| 16 | 277 | 11.54 |
| 17 | 294 | 12.25 |
| 18 | 311 | 12.96 |
| 19 | 328 | 13.67 |
| 20 | 345 | 14.38 |
| 21 | 362 | 15.08 |
对齐方向:向上(H3 节点自身即 "snapped up")。因此 7.5 秒 → 180 帧 → 吸附为 192 帧 → 实际 8.00 秒。