JZL - 📋 分段处理中心
The segment processor that turns an LLM's messy script into four clean lists
- shot_text
- H3提示词
- 场景调度指令
- 视频调度
- 音频调度
If the 🎬 剧本与镜头处理器 is the screenwriter, JZL - 📋 分段处理中心 (Shot Formatter) is the script supervisor who reads the draft and makes it usable. It takes the raw script text an LLM just wrote, splits it into individual shots, and hands you four parallel lists - one H3 prompt per segment, plus separate scene, video, and audio dispatch instructions. Nothing here runs a model. It's a parser and a cleanup pass, and it exists because LLMs do not reliably emit structured output.
Why the cleanup matters
The script processor writes each shot as a [SHOT_START]...[SHOT_END] block with four tagged sections: ===H3_PROMPT===, ===SCENE_INSTRUCTION===, ===VIDEO_INSTRUCTION===, ===AUDIO_INSTRUCTION===. Left raw, that text is unusable downstream: the LLM forgets the scene instruction, writes a slot name as 道具:C instead of 道具:道具C, or leaves a trailing colon. This node fixes all of it - it normalizes slot names (normalize_slots), strips stray punctuation, and when the scene instruction is missing entirely it rebuilds one from the segment's structured fields (characters, scene, props) rather than guessing at slot names it can't know. It deliberately leaves the slots empty in that fallback rather than inventing a wrong mapping - a wrong slot name is worse than no slot, because it silently mismatches your reference images.
Inputs and the one that changes how you work
- shot_text (
*) - the script, from the ✨ 提示词增强's 增强后剧本 (or directly from the script processor's 剧本输出). - reshoot_mode (BOOLEAN) - the interesting one. Turn it on and the node stops parsing the wire and reads a saved
第NNN次分段词file instead, selected via a file picker. The front-end also auto-mutes the upstream LLM chain, so you can re-run just the formatting step - same script, re-sliced or re-saved - without burning another LLM call.
Outputs (all lists, one entry per segment)
- H3提示词 - per-segment H3 prompts, in order. Feed these into the H3 generation path (or the pack's generation manager).
- 场景调度指令 - per-segment scene slot lists → 🎯 场景元素调度.
- 视频调度 - per-segment video slot lists → 🎬 视频调度.
- 音频调度 - per-segment audio slot lists → 🎧 音频调度.
All four are parallel: entry i of each list is segment i+1. Keep that in mind when you start wiring lists into per-segment generation - everything lines up by index.
The node also writes the parsed output to {ComfyUI output}/jzl/{story_name}/第NNN次分段词/, which is what powers reshoot mode and gives you a re-runnable version history.
Install
Standard JZL pack install: ComfyUI Manager → search JZL or ComfyUI-JZL-MiniMax-H3, or clone https://github.com/wjluoxiao/ComfyUI-JZL-MiniMax-H3 into custom_nodes/ and restart. No model downloads, no llama runtime - this node is pure text processing, so it runs instantly.
One thing that trips people: because the outputs are lists, a node that expects a single string downstream will look "wrong" until you either index into the list or connect it to something list-aware. And if you're using reshoot mode and the file picker opens empty, check that the script processor actually ran once first - there's no file until the first successful pass.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| reshoot_mode | BOOLEAN | false | — |
| shot_textopt | * | — | |
| _reshoot_pathopt | STRING | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| H3提示词 | STRING | — |
| 场景调度指令 | STRING | — |
| 视频调度 | STRING | — |
| 音频调度 | STRING | — |