ComfyUI Extension: comfyui-promptsegmentselector
Run ComfyUI workflows without the setup
No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.
Split a multiline prompt into up to 12 numbered STRING outputs using a user-defined delimiter. Useful for multi-segment video workflows.
README
ComfyUI-PromptSegmentSelector
A tiny utility node that splits a single multiline prompt into up to 12 numbered STRING outputs using a user-defined delimiter. Useful for driving per-segment prompts in multi-shot or multi-segment video workflows (e.g. WAN 2.2 FLF SVI chains, multi-prompt animations) without maintaining 12 separate text nodes.
Install
Clone into your ComfyUI custom_nodes directory:
cd ComfyUI/custom_nodes
git clone https://github.com/BarleyFarmer/ComfyUI-PromptSegmentSelector
Restart ComfyUI. No dependencies beyond the Python stdlib.
Usage
Find the node under text/utility → Prompt Segment Selector.
Inputs:
text(multiline STRING) — your combined prompt text.delimiter(STRING, default---) — the string separating segments.
Outputs: segment_1 … segment_12 (STRING). Unused slots return "".
Example
Input text:
Wide establishing shot of a coastal village at dawn.
---
Medium shot of a fisherman pulling in nets.
---
Close-up of hands tying knots.
Yields:
segment_1="Wide establishing shot of a coastal village at dawn."segment_2="Medium shot of a fisherman pulling in nets."segment_3="Close-up of hands tying knots."segment_4…segment_12=""
Why ---?
ComfyUI normalizes whitespace inside multiline text widgets, so delimiters based on blank lines (\n\n) can silently fail. A distinct string like --- is reliable.
Behavior notes
- Leading and trailing whitespace is stripped from each segment.
- Empty middle segments are preserved so downstream indices stay aligned. For example,
a---\n\n---cproducessegment_1="a",segment_2="",segment_3="c". - Trailing empty segments are trimmed.
- Inputs with more than 12 segments are truncated to 12, with a warning printed to the ComfyUI console.
License
MIT
Run ComfyUI workflows without the setup
No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.