Text Split (Delimiter)
Split one text string into twenty parts and a remainder — for real workflows
- part_1
- part_2
- part_3
- part_4
- part_5
- part_6
- part_7
- part_8
- part_9
- part_10
- part_11
- part_12
- part_13
- part_14
- part_15
- part_16
- part_17
- part_18
- part_19
- part_20
- remainder
- count
There's a whole class of ComfyUI workflows that are secretly about lists: a comma-separated prompt variant string, a newline-delimited set of negative prompts, a filename list you want to iterate over. To use those in the graph you need to split the string apart - and most text-splitter nodes make you think about output sockets that don't exist yet.
Text Split (Delimiter) is the boring, dependable version: split on a delimiter, get up to twenty named parts (part_1…part_20), a remainder bucket for overflow, and a count. Fixed socket layout, no dynamic outputs, no surprises when you reload a saved workflow.
How it works
Plain string splitting with sensible defaults and one nice escape hatch: the delimiter field understands \n, \r\n, \r, and \t as escape sequences, so you can split on newlines or tabs just by typing the escape. Behavior is controlled by three toggles:
output_count- how many leading parts get their own socket before overflow lands inremainder. Default 4.strip_parts- trims whitespace around each part (default on; you almost always want this).skip_empty- drops empty parts after splitting (default on, so trailing commas don't create phantom empty slots).
Whatever remains after the visible parts is re-joined with the delimiter into remainder, so nothing is ever lost. count tells you how many parts existed in total.
The inputs that matter
text- the string to split.delimiter- what to split on.,by default;\nis the other common choice.output_count- number of leading part sockets.
Outputs: part_1 through part_20, remainder, and count. The parts that exceed output_count still exist as sockets - they just come back empty and the overflow goes to remainder.
Install
Part of the Enviral Design Node Pack. ComfyUI Manager: search "Enviral Design Node Pack". Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/EnviralDesign/comfyUI-enviral-design-node-pack
then restart. No extra dependencies.
When you'd reach for it
The natural pattern: a Custom Combo or a text file feeds a big comma-separated string, this node splits it, and the parts drive things like Enviral Sampler Name, Enviral LoraName, or prompt text encoders per pass. It's also the handiest way to feed a batch of filenames into a loader. The fixed-socket design is deliberate - dynamic outputs are clever until a saved workflow reloads with different count and every wire points at nothing. The trade-off: if you need more than twenty parts, you need a different tool, because twenty is the hard cap here.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | Input text to split. | |
| delimiter | STRING | , | Delimiter used to split the input text. Supports \n, \r\n, \r, and \t escapes. |
| output_count | INT | 41–20 | How many leading parts to expose before the remainder bucket. |
| strip_parts | BOOLEAN | true | Trim whitespace around each split part. |
| skip_empty | BOOLEAN | true | Drop empty parts after splitting. |
Outputs (22)
| Name | Type | Description |
|---|---|---|
| part_1 | STRING | — |
| part_2 | STRING | — |
| part_3 | STRING | — |
| part_4 | STRING | — |
| part_5 | STRING | — |
| part_6 | STRING | — |
| part_7 | STRING | — |
| part_8 | STRING | — |
| part_9 | STRING | — |
| part_10 | STRING | — |
| part_11 | STRING | — |
| part_12 | STRING | — |
| part_13 | STRING | — |
| part_14 | STRING | — |
| part_15 | STRING | — |
| part_16 | STRING | — |
| part_17 | STRING | — |
| part_18 | STRING | — |
| part_19 | STRING | — |
| part_20 | STRING | — |
| remainder | STRING | — |
| count | INT | — |