🔗 H3 Relay · Chain
The H3 Relay Chain node that runs the whole film
- prompt
- report
Multi-segment generation with the H3 Latent Relay pack has one real chore: run_id and stage_index have to match across the Latent Save, the Copy Bridge, the Latent Load, Trim AV, Audio Seam, and this node - six places. The pack's canvas JS does auto-sync run_id within a group, but the stage number is still something you have to bump between runs. Do it by hand for a ten-segment piece and you will eventually do it wrong, and the failure mode isn't a crash; it's a segment silently continued from the wrong tail.
H3RelayChain is the controller that takes that job. It's plumbing, in the truest sense from the node plumbing layer - it carries no pixels, no latent, no audio. It finds the Copy Bridge, Latent Save and Latent Load in its group, advances their stage numbers, and queues the next run for you. It also has a prompt output, which is how per-segment wording works.
What you actually get
The node is mostly buttons. ▶ Run queues the current stage. ✔ Approve bumps the stage and queues the next. ⏩ 连跑 (run-through) walks segments stages automatically - set segments: 0 and it keeps going until you hit stop. ↺ Reset takes you back to stage 0. 🧩 拼成一条 (concat into one) stitches the segments you've already rendered into a single film, using the pack's own /h3relay/concat route on the backend.
Two conveniences, both off by default so old graphs don't shift:
prompts- paste every segment's text separated by a line containing only---. Block 1 goes to segment 0, block 2 to segment 1, and so on, selected bystage_index. Wire the node'spromptoutput into your prompt encoder's prompt input - that's the step people miss. The block count is checked againstsegments: run short and it refuses to queue and tells you, rather than silently reusing the last block. That refusal is on purpose. A silent reuse means you render three segments of identical action and only notice at the join.auto_concat- withrun_idset, each finished segment records its progress to_progress.jsonin the segment folder, so the run-through resumes from where it died after a crash or restart.
Required input is just segments. Useful optional: run_id (needed for skip-proof, and must match the bridge/save), stage_index, prompts, auto_concat, concat_name, audio_out (aac_256k default, pcm_lossless if you're handing this to an edit, though that one has no browser preview audio), video_crf (only matters when segments mismatch and a re-encode is unavoidable). The status and concat_result fields are outputs dressed as widgets - don't type in them.
Outputs are prompt (the per-stage text) and report.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/ZenHG/ComfyUI-H3-Latent-Relay.git
ComfyUI Manager → search h3-latent-relay also works. Restart the backend afterwards. Base deps come from ComfyUI itself; concatenation additionally needs av>=17 (already there). The buttons are front-end JS inside the pack's web/ folder, so if a click does nothing, refresh the browser tab as well as restarting Python.
Traps
Group the nodes. The controller looks for the bridge, save and load inside its own group box - select Chain + Copy Bridge + Latent Save + Latent Load, right-click, add to a group. Ungrouped it falls back to whole-graph scope and warns about it. If you've changed run_id and one node didn't follow, it's almost always a node outside the group.
Button-operated means API submissions ignore the buttons. This node is honest about that boundary: the pack's rule is that every feature must be reachable both from the canvas and from an API-submitted graph. Here the prompt dispatch was moved into the node itself so both paths share one implementation, but stage advancement is genuinely a canvas gesture - submitting the graph JSON means your loop advances stage_index yourself. The pack's docs ship a loop template for that.
segments counts, prompts blocks must cover it. Set segments: 5 with three prompt blocks and you get three renders and a refusal, not five.
Not the same as a sampler chain. If you're looking for the "chain" that controls sampling steps, that's a different node entirely. This one only sequences stages of a film.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| segments | INT | 50–9999 | 【跑到第几段】只对连跑 / 续跑有效。 填 3 = 跑到第 3 段就停(不是「再跑 3 段」);填 0 = 一直跑到你点停止。 填了 prompts 时不要超过词块数。 |
| statusopt | STRING | 【不用填】显示连跑状态:跑到第几段 / 有没有在排队 / 出错原因。 按钮点了没反应时先看这一格。 | |
| promptsopt | STRING | 【可选】每段各自的词。 用单独一行 --- 把词分成几块:第 1 块给第 1 段,依次类推。留空 = 不换词。 ⚠ 词块数不够要跑的段数时不排队,并告诉你。也可以从别的节点连线进来。 | |
| prompt_targetopt | STRING | 【已废弃】旧版「前端替你写词」那条路已删除,这一格不再起作用。 现在词从这个节点的 prompt 输出口给。 保留它只是不让旧工作流的槽位错位。 | |
| auto_concatopt | BOOLEAN | true | 【默认开】开 = 连跑跑完自动把这几段拼成一条成片(画面无损,几秒钟)。 关 = 只得到 N 个分段 mp4,想拼时点「拼成一条」。 ⚠ 拼接要有保存视频的节点(段文件从它那儿找)。 |
| concat_nameopt | STRING | 【可选】成片叫什么名字(不用写 .mp4)。留空 = 用保存时的 run_id。 成片存在 ComfyUI 的 output/ 目录。 | |
| audio_outopt | COMBO | aac_256k | 【成片音轨】只影响拼出来的成片,不影响分段文件。 · aac_256k(默认)= 通用档:浏览器能放、剪辑软件都认。 · aac_192k = 一样能放,文件小约 25%。 · pcm_lossless = 无损音轨,给剪辑/归档用。⚠ 文件大很多,且浏览器预览没声音。 |
| video_crfopt | INT | 160–51 | 【成片画面质量】默认 16,平时用不到。 成片默认直接拷贝画面(无损、不重新编码);只有各段规格对不上必须重编码时才生效:数字越小越清晰。 |
| stage_indexopt | INT | 00–9999 | 【现在跑第几段】段号从 0 开始(第 1 段 = 0)。 它决定输出 prompts 里的第几块词。 · 画布上:点运行按钮会自动和桥、保存、读上段 latent 一起改。 · 脚本提交:循环里把这一格和桥/保存的段号改成同一个数。 ⚠ 填得比词块数大 ⇒ 执行时直接报错。 |
| run_idopt | STRING | 【可选】续跑用:和桥 / 保存上填的 run_id 一样。 填了之后每跑一段会把进度记到 _progress.json ⇒ 中途卡死或重启后点续跑能接着跑。 留空 = 不记进度。 | |
| concat_resultopt | STRING | 【不用填】成片路径:拼接成功后这里显示 output/ 下的成片文件。 拼接失败时显示失败原因(完整报告在控制台)。它不会被状态消息覆盖。 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| report | STRING | — |