String Splitter (CCN)
Fan one CSV row into five outputs
- out_1
- out_2
- out_3
- out_4
- out_5
Sometimes you have the opposite problem from the concat nodes: one string with five values in it, and you need them as five separate wires. String Splitter (CCN) takes a,b,c,d,e and hands you a out of out_1, b out of out_2, and so on - up to five outputs from one input. The node description is honest about the shape of it: "Split a string by a delimiter into up to 5 outputs. Unused outputs return empty strings."
The classic use is fanning a CSV-style row into fields - subject, style, camera, lighting, and a spare - so each can feed a different part of the graph. It's also the natural inverse of String Concatenate (CCN): concat joins pieces into one string, this splits one string into pieces, and they sit in the same pack for a reason.
How it works
It splits text on delimiter (default comma), but not with a plain split(). It uses a max-split of 4, which means only the first four delimiters split the string - the fifth output (out_5) holds the entire remainder, commas and all. That's a deliberate design choice: it's how you get exactly five outputs even when the input has more than five items, instead of losing data past position five.
Each part is whitespace-trimmed as it comes out, and any outputs beyond what the input produced are empty strings. No crash, no erroring on a two-item list - just empty out_3 through out_5.
The inputs and outputs that matter
text- the source string.delimiter- the literal split character, default comma.
Outputs: out_1 through out_5, all STRING. If you only need three fields, leave out_4 and out_5 unconnected.
How to install it
This is a ComfyCollectorNodes node, so it comes with the pack. ComfyUI Manager → search ComfyCollectorNodes → Install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/valkymaera/ComfyCollectorNodes.git
Restart ComfyUI when prompted. No extra Python dependencies, so there's no pip install step. Look for the (CCN) suffix in the node menu.
Common issues
The "only first four delimiters split" behavior is the thing to internalize. If you expect a true split() that creates as many outputs as there are items, this node will surprise you when item six shows up inside out_5. It's the right trade for a fixed five-output node, but it means this isn't the tool for variable-length lists - for that, String List Slicer (CCN) in the same pack lets you pull any index from a delimited string.
Also, whitespace-trimming is unconditional here. If your fields need their padding preserved, this isn't the node for you. For the 95% case of "split a CSV row into usable parts," it's exactly right and pleasantly boring.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| delimiter | STRING | , | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| out_1 | STRING | — |
| out_2 | STRING | — |
| out_3 | STRING | — |
| out_4 | STRING | — |
| out_5 | STRING | — |