Text List to Strings
The bridge between lists and everything else
- text_list
- strings
- count
The WAS text-list nodes are powerful, but they speak a language most of ComfyUI doesn't: a single ARRAY wire carrying many entries. Most nodes want one plain STRING per run. Text List to Strings is the translator, and it's the node you reach for whenever a list hits a dead end because nothing downstream will accept it.
What it does
Give it any LIST output - Text Split to List, Text List, Text Dictionary Keys, even Image Color Palette - and it hands every entry back out as a STRING list. And because a STRING list is a list, each node that reads it executes once per entry, producing one result per entry. Six prompts in the list, six images out of the sampler downstream. That's the entire point: it converts "a list you can only do list-things with" into "the normal per-item execution most of ComfyUI is built around."
The one input besides the list is remove_empty, and it's worth thinking about. Leave it off (default) and an entry holding nothing costs you a full run of everything downstream - a sampler run that produces a result from an empty prompt, for nothing. Turn it on and empty entries are dropped before the list is handed on. If your list comes from a split with trailing empty pieces, you usually want it on.
The rule that bites
An empty list stops the prompt. There's no zero times to run a graph below a fan-out list, so the pack refuses to try - you get an error rather than a silent no-op. That's consistent across all the list nodes here, and it's the reason remove_empty exists as a guard. If an empty result is a real possibility upstream, handle it before this node: check with Text List Length's is_empty output and route around it.
Where this node shines is right before anything that eats one string at a time:
- A sampler's positive prompt, to render every line of a file in turn.
- A Load Image or filename input, to process each path in a list.
- Text Concatenate chains or a save node, to handle each entry separately.
It's the everyday counterpart to Text List to Numbers (which does the same fan-out for numeric lists) and to Text List Get (which pulls one entry rather than iterating all of them). If you find yourself with a list you can't feed anywhere, this is usually the missing link - and if you're staring at an ARRAY and thinking "why won't this sampler take it?", this is your answer.
Installing it
Part of WAS Node Suite v3 (WASasquatch's was-node-suite-comfyui, MIT). Search "WAS Node Suite v3" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui.git
Restart ComfyUI after installing. Requires ComfyUI 0.14.0+ and Python 3.10+; no extra dependencies.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| text_list | ARRAY | The list to unpack. Any LIST output does: Text Split to List, Text List, Text Dictionary Keys, Image Color Palette. | |
| remove_empty | BOOLEAN | false | Whether entries holding nothing are dropped before the list is handed on. Each empty entry would otherwise cost a full run of everything downstream to produce a result from an empty prompt. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| strings | STRING | The entries, one per run. A node reading this executes once for each of them, so a list of six prompts renders six images. An empty list stops the prompt, because a graph cannot be run zero times. |
| count | INT | How many entries were handed on, which is how many times the graph below this node runs. |