String To List
Turn one or two strings into a ComfyUI LIST
- LIST
Small node, small job: hand it one or two strings and it wraps them into a LIST. The pack author's own example is the whole spec - a and b in, [a, b] out. If you've ever needed to feed a couple of string values into a node or a loop that only accepts a LIST type, and had nothing upstream already producing one, this is the bridge.
It's one of the plumbing nodes in comfyui-easyapi-nodes, lldacing's pack of small utilities for API-driven ComfyUI graphs, sitting alongside the equivalent IntToList for integers. Neither node does anything clever - they exist because ComfyUI's type system distinguishes STRING from LIST-of-STRING, and there's no built-in way to promote one into the other without a node to do it.
Where you'd actually use it
The obvious case is feeding a loop. This pack's ForEachOpen node, or any other node that expects a LIST input, won't take a bare STRING - so if you've got one or two string values you need iterated over or batched, StringToList gets them into the shape the rest of your graph needs. It's also handy when you're combining two separately-computed strings - say, one from an API caller's request and one built inside the graph - into a single list before merging further lists with ListMerge.
The inputs and outputs that matter
str_a(STRING, required) - the first (and possibly only) string.str_b(STRING, optional) - a second string, appended afterstr_aif you provide one.- Output:
LIST-[str_a]if onlystr_ais set,[str_a, str_b]if both are.
That's the entire node. No delimiter parsing, no splitting a single string on commas or newlines - for that you'd want the pack's separate SplitStringToList node, which is a different tool for a different job.
How to install it
Via ComfyUI Manager, searching comfyui-easyapi-nodes. Manual install:
cd ComfyUI/custom_nodes
git clone https://github.com/lldacing/comfyui-easyapi-nodes.git
cd comfyui-easyapi-nodes
pip install -r requirements.txt
Restart ComfyUI afterward. Nothing to download beyond the pack itself - no models, no GPU-side dependencies.
Common issues & troubleshooting
I need more than two strings in the list. StringToList caps out at two inputs. Chain a second StringToList's output into ListMerge alongside a third string wrapped the same way, or reach for SplitStringToList if your strings are really one delimited string that should become several list items.
Confusing this with a delimiter-splitting node. It's a common mix-up given the name - StringToList doesn't parse or split anything, it just wraps whatever whole strings you give it. If you're passing in "apple,banana,cherry" expecting three list items, you'll get one list item containing the whole comma-separated string. SplitStringToList is the node for that case.
Downstream node rejects the list. Double-check what element type the consuming node actually expects. StringToList always produces a list of strings - if the next node wants integers or some other type, you'll need a conversion step in between.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| str_a | STRING | — | |
| str_bopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LIST | LIST | — |