String To List
Turn a text blob into a real ComfyUI list — comments and all
- list
Lists are the currency of ComfyUI batch work, but the nodes that produce them are stingy - most things hand you text, and a chunk of plain text is not a list. String To List is the bridge: paste a block of prompts, filenames, or tags, pick a delimiter, and get a real STRING list out the other side that every list node in the ecosystem will accept. It's the front door to the pack's whole list family.
How it works
The main input is combined_string, a multiline text box - so yes, you can paste a column of prompts directly in. The delimiter dropdown decides how it gets chopped up: comma, semicolon, space, newline, or custom. Pick custom and a second field, custom_delimiter (default ;), defines the split. There's also comment_prefix (default //).
The split itself is tidy: each piece is stripped of surrounding whitespace and empty entries are dropped. That means comma mode handles "a, b, c" without leaving you orphan spaces, and newline mode ignores blank lines.
The comment bit is actually good
comment_prefix isn't there for decoration. Before splitting, the node walks each line and removes anything from the // prefix onward, plus drops lines that are entirely comments. That means you can keep documentation inside a prompt list - annotate which subject each entry is, note where a list came from - and the comments just dissolve on the way to the list. For a "paste a big batch of prompts" workflow, that's the difference between a file you'd maintain and a pile of mystery strings.
Where you'd use it
The canonical move: paste twenty prompts into combined_string with newline delimiter, wire the list output into the pack's Random Entry or Indexed Entry, and you've got a prompt-roulette workflow. Or feed the list into Sort List, Split List, or a batch pipeline. It's also the natural inverse of String Combiner - combine lists into templates over here, break text back into lists over there.
Install
It ships in ComfyUI-TinyBee. ComfyUI Manager → search ComfyUI-TinyBee → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/TinyBeeman/ComfyUI-TinyBee
Found under 🐝TinyBee/Lists. Pure stdlib, no models, no extra dependencies - the pack's pillow/jsonata requirements are for its image and JSON nodes.
Gotchas
The custom_delimiter field is ignored unless the dropdown actually says custom - a common confusion, since the field is always visible with a default of ;. And remember comment stripping happens before the split, on a per-line basis, so an inline // mid-prompt cuts the rest of that line. If your data genuinely contains //, change the comment_prefix to something that doesn't appear in it.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| combined_string | STRING | — | |
| delimiter | COMBO | newline | 5 options: comma, semicolon, space, newline, custom |
| custom_delimiter | STRING | ; | — |
| comment_prefix | STRING | // | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| list | STRING | — |