Text Split By Delimiter (Array) (FeiMao-326)
Split a string into a real list — the partner node for Get List Element
- array
ComfyUI is full of strings but it has precious few real list types. Most text utilities hand you one big string and make you parse it yourself. This node gives you an actual list: split "cyberpunk alley, rain, neon" on a delimiter and out comes a LIST you can index, pass around, and feed into the pack's Get List Element node.
How it works
Two inputs: text (multiline) and delimiter (default ,). The node splits the text on the delimiter, strips whitespace off every item, and returns the whole thing as a single LIST-typed output named array. The strip matters more than it sounds like it should - "a , b , c" becomes ["a", "b", "c"] rather than ["a ", " b", " c"], which is the difference between prompts that work and prompts with invisible leading spaces.
A few behaviors worth knowing:
- Type
\nas the delimiter and it's converted to an actual newline, so you can split multi-line blocks into per-line items. - Empty delimiter means no sensible split, so it just returns the whole text as a one-item list rather than erroring.
- The output is the pack's custom
LISTtype, not a string list. That's the point - it connects to nodes that know how to handle lists, chiefly this pack's Get List Element.
Where it fits
The intended flow is split → index. Get List Element takes a LIST and an index and hands you one item as a string, ready to feed into a prompt template or a text encoder. So the combination gives you "split a batch of prompts, then pick which one you want," which is genuinely useful when a single run should only generate one of several options.
It's worth being precise about the difference between this and the pack's Text Iterator: this returns a real LIST for indexing (no batch execution), while Text Iterator returns a string list that triggers ComfyUI's batch loop, running everything downstream once per item. Split is "give me a container." Iterator is "give me a loop." They complement each other; they're not interchangeable.
One structural note: because the LIST type is this pack's own, it won't wire into arbitrary third-party list nodes unless they agree on the type name. Within the pack it all lines up cleanly - Split feeds Get List Element, and Get List Element outputs a plain STRING that anything can use.
Inputs and outputs
text(STRING, multiline) - the text to split.delimiter(STRING) - what to split on; default,.array(LIST) - the split items, one output.
That's the whole node - there's nothing to tune beyond the delimiter.
Installing
It ships in the FeiMao-326 pack (category "FeiMao-326"), so you get it alongside the rest of the utilities. ComfyUI Manager (search "Comfyui-General-API-Node") or:
cd ComfyUI/custom_nodes
git clone https://github.com/FeiMao-326/Comfyui-General-API-Node.git
cd Comfyui-General-API-Node
pip install -r requirements.txt
Restart ComfyUI after installing. No model downloads, and the only real dependencies are openai, numpy, Pillow, and requests.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| delimiter | STRING | , | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| array | LIST | — |