Multiline Prompt Splitter (8 outputs)
One multiline prompt, eight clean outputs, zero copy-paste
- prompt_1
- prompt_2
- prompt_3
- prompt_4
- prompt_5
- prompt_6
- prompt_7
- prompt_8
- count
If you've ever batch-generated variants, you know the drill: keep a text file with a prompt per line, and every time you change one line you carefully re-paste it into the right node. IAMCCS_MultilinePromptSplitter8 ends that. Drop a multiline block of prompts into one box, and it hands you prompt_1 through prompt_8 plus a count - each line routed to its own output, ready to feed separate text encoders or generation branches.
It's a tiny utility from IAMCCS-nodes, and the pack's own README frames it as part of the dataset-creation ecosystem: when one dataset slot needs to drive several prompt variants, this is the node that turns a pasted block into explicit per-line routing without duplicating sampling chains by hand.
How it works
The node splits text on a separator (default \n), with strip_empty (true) quietly dropping blank lines so a stray double-return doesn't produce an empty prompt. Then the outputs are filled in order. The interesting part is fill_mode, which decides what happens when you have fewer lines than outputs (or you're looping over them):
empty- unused outputs are empty strings. The simplest and often the most predictable for downstream nodes.repeat_last- the last line is repeated into the remaining outputs. Handy when one prompt is "the default" for a slot.wrap- lines cycle: with two prompts and eight outputs, you get 1,2,1,2,1,2,1,2. This is the mode for alternating variants across a loop.
Outputs 1–8 are fixed; count tells you how many lines actually landed, which is your loop counter when you're iterating over variants.
Inputs and outputs
text(STRING) - the multiline block.separator(STRING,\n),strip_empty(BOOLEAN, true),fill_mode(enum:empty/repeat_last/wrap).
Outputs: prompt_1…prompt_8 (STRING) + count (INT).
How to install
Part of IAMCCS-nodes. ComfyUI Manager search "IAMCCS", or:
cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git
Restart. No dependencies beyond the pack itself (ComfyUI ≥ 0.3.0, Python ≥ 3.12). No model downloads.
Gotchas
Two things to watch. First, the separator is literal - if you feed Windows line endings (\r\n) and only split on \n, you'll get stray \r characters in your prompts, and strip_empty won't catch them. Paste from a text editor set to LF, or it'll bite. Second, wrap is fun but surprising: if a downstream node assumes prompt_5 is "the fifth distinct prompt," it isn't - it's a cycled repeat. For strict variant handling, empty or repeat_last are the safe modes. And note this splits text only - it doesn't renumber, weigh, or parse anything else. If your multiline block is actually a prompt with newlines inside a single prompt, this node is the wrong tool; it's for one-prompt-per-line.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| separatoropt | STRING | \n | — |
| strip_emptyopt | BOOLEAN | true | — |
| fill_modeopt | COMBO | empty | 3 options: empty, repeat_last, wrap |
Outputs (9)
| Name | Type | Description |
|---|---|---|
| prompt_1 | STRING | — |
| prompt_2 | STRING | — |
| prompt_3 | STRING | — |
| prompt_4 | STRING | — |
| prompt_5 | STRING | — |
| prompt_6 | STRING | — |
| prompt_7 | STRING | — |
| prompt_8 | STRING | — |
| count | INT | — |