Prompt Splitter (10 Lines)
One box feeding ten branches of your graph
- line_1
- line_2
- line_3
- line_4
- line_5
- line_6
- line_7
- line_8
- line_9
- line_10
When you stop wanting ten separate text boxes
Every ComfyUI graph starts with one prompt and grows. Then it grows a negative. Then somebody adds a second model to compare, an inpaint pass, a variation branch - and suddenly you're editing text in ten different widgets scattered across a canvas, unable to remember which field feeds which path.
Prompt Splitter (10 Lines) is the top end of a small pack built to fix that. One multiline box, ten STRING outputs, each line wired to a different branch of the graph. It's the variant you graduate to: once your workflow has more than a handful of text-bearing paths, having all of them in one editable node stops being a nicety and starts being the thing that keeps the graph readable.
What it is (and isn't)
It's a text-only splitter from elgalardi/comfyui-prompt-splitter. One text input in, line_1..line_10 outputs out. No CLIP input, no processing, no model files, no external dependencies - the whole pack is a single Python file that splits text on newlines. The README's "works with SD / SDXL / WanVideo / AnimateDiff" isn't a compatibility list so much as a statement of fact: the outputs are plain strings, so anything that accepts a string accepts them. Wire line_1 into your positive CLIP Text Encode, line_2 into the negative, and the rest wherever the graph takes them.
That also means this is not a dynamic-prompt engine. No wildcards, no weighting magic, no randomization. Ten static strings, exactly as you typed them.
The inputs and outputs that matter
text- multiline STRING. All ten prompts, one per line.line_1throughline_10- STRING outputs, one per slot.
Empty slots return "", which is fine - an empty string is a valid prompt, so you don't need to fill all ten slots to avoid errors.
Install
About as clean as custom-node installs get:
cd ComfyUI/custom_nodes
git clone https://github.com/elgalardi/comfyui-prompt-splitter
Restart ComfyUI and look under the Text category. ComfyUI Manager can do it too - search "comfyui-prompt-splitter". No requirements.txt to fight with, no models to download.
Where people get burned
The split logic has two quirks worth remembering, and they matter more at ten lines because you're more likely to be arranging things deliberately:
- Blank lines collapse. Every line is stripped and empty lines are skipped before slots are assigned, so you can't use an empty line to hold a slot open -
"a\n\nb"gives you line_1=a, line_2=b. Want a gap? Drop a placeholder like-on that line. - Silent truncation. Lines past ten are cut with no warning. With ten slots that's rarely the problem it is on the 3-line node, but if you paste a long prompt block, count your lines first.
If this is your first node from the pack, know that the 3- and 5-line versions behave identically - same input, same logic, fewer outputs. Pick the count that matches how many branches you actually have. Ten lines is the flagship, but a 3-line node with no empty slots is worth more than a 10-line node running eight ""s.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — |
Outputs (10)
| Name | Type | Description |
|---|---|---|
| line_1 | STRING | — |
| line_2 | STRING | — |
| line_3 | STRING | — |
| line_4 | STRING | — |
| line_5 | STRING | — |
| line_6 | STRING | — |
| line_7 | STRING | — |
| line_8 | STRING | — |
| line_9 | STRING | — |
| line_10 | STRING | — |