Dual Prompt List Batch (PMS)
The scene-splitting node for story pipelines
- voice_prompt
- visual_prompt
- index
- index_str
This is the node you reach for when you're building a narrated-video pipeline and you're tired of manually pairing each visual with its voiceover line. It takes two multiline text boxes - one for narration, one for visuals - splits each on a separator, and pairs them up scene by scene, outputting four aligned lists. No API calls, no keys, no cost. It's pure Python string surgery, and it's genuinely useful.
The design bet is that your story pipeline runs scene-by-scene: scene 1's narration goes to a TTS node while scene 1's visual description goes to an image or video generator, then scene 2, and so on. This node produces the matched lists that make that loop work.
How it works
Both voice_prompts and visual_prompts are split on the separator string (default ---, which is why the defaults look like three paragraphs joined by lines). It then trims whitespace, drops empty entries, and pairs them positionally: entry N in the narration becomes voice_prompt[N], entry N in the visuals becomes visual_prompt[N]. The count is capped by the shortest list and by max_scenes.
The inputs that matter
- voice_prompts - narration lines, one per scene, separated by
---. - visual_prompts - visual descriptions, same separator, same number of scenes.
- separator - what splits the blocks. If your text contains
---legitimately, change this to something else (e.g.###). - max_scenes - 1–50 cap on how many scenes get emitted. Safety valve for sloppy input.
Outputs - all four are lists
voice_prompt(STRING list) andvisual_prompt(STRING list) - the paired scenes.index(INT list) andindex_str(STRING list) - the scene numbers, the string version zero-padded as000,001… handy for filenames and for keeping outputs in order.
In list-output mode ComfyUI routes each list item through downstream nodes, which is how each scene gets its own TTS + generation run. If you feed a list into a node that expects a single string, that's your problem source - lists flow differently than scalars.
Installing it
ComfyUI Manager → search "COMFYUI_PROMPTMODELS" → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/cdanielp/COMFYUI_PROMPTMODELS
This node needs no API key - it's pure utility. Just ComfyUI >= 0.26.0 and a restart.
The gotchas
The failure mode is mismatched scene counts. The node silently truncates to the shorter list, so if you add a narration line but forget its visual, you lose a scene with no warning. Count your separators. The second thing: the separator is literal - the default is three dashes with no spaces, and --- inside a prompt (like an em-dash line) will split unexpectedly. If your content has dashes, switch the separator before anything else.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| voice_prompts | STRING | Texto narracion 1 --- Texto narracion 2 --- Texto narracion 3 | — |
| visual_prompts | STRING | Descripcion visual 1 --- Descripcion visual 2 --- Descripcion visual 3 | — |
| separator | STRING | --- | — |
| max_scenes | INT | 51–50 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| voice_prompt | STRING | — |
| visual_prompt | STRING | — |
| index | INT | — |
| index_str | STRING | — |