Join List
JoinList (Join List) – ComfyUI Node
- lst
- STRING
What it is
JoinList does the thing every scripting language calls .join(): take a list, stitch its elements together with a delimiter, and hand back one string. ["a", "b", "c"] with a comma delimiter becomes "a,b,c" - that's the entire README example, and it's the entire node. Small, but genuinely useful whenever a workflow needs to turn a list of values (tags, file paths, detected labels, anything you've been collecting or filtering elsewhere in this pack's list nodes) into a single text field for display, for a prompt, or for whatever's consuming it next expects a plain string rather than a structured list.
How it works
Every element gets converted to a string first (the README notes this explicitly - it doesn't assume your list already contains strings), then all of them get concatenated with your chosen delimiter between each pair. That upfront stringification is worth knowing about if your list holds numbers, booleans, or other non-string values - you don't need to convert them yourself first, the node handles it, but it also means you have no control over how each element gets stringified beyond whatever Python's default string conversion produces for that type.
Inputs and outputs
lst(LIST, required) - the list to join.delimiter(STRING, default,) - the separator placed between elements.
One output, named STRING (type STRING) - the joined result.
Installing it
Comes bundled with comfyui-easyapi-nodes. Through ComfyUI Manager: search "comfyui-easyapi-nodes", install, restart ComfyUI. 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
Nothing this node needs beyond the base pack, but the requirements install is worth doing anyway so the rest of the pack (which does have real dependencies for some nodes) loads properly. git pull in the folder later to upgrade.
Common issues
"My output has weird formatting for numbers or nested objects." That's Python's default string conversion showing through - a float might come out as 3.0 instead of 3, a nested dict or list inside your list will get stringified as its Python repr rather than clean JSON. If you need controlled formatting per element, convert each element to exactly the string you want before it reaches this node (this pack's ConvertToJsonStr is the right tool if the elements are structured data you want as proper JSON rather than however Python's default str() renders them).
"I want a different delimiter than a comma, like a newline or a pipe." Just set delimiter to whatever you need - it's a plain string field, so a newline character, a pipe (|), a space, multi-character separators, all work the same way a comma does.
"I actually need to go the other direction - split a string into a list." This pack has a node for that too (SplitStringToList, not covered in this batch, or StringToList) - JoinList only runs one way, list to string, not string to list.
"I've got a list where I only want some elements joined, not all of them." Filter or index down to the subset you want first - this pack's FilterValueForList, IndexOfList, or IndexesOfList - and feed the result into JoinList. It always joins everything it's given; there's no built-in filtering.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| lst | LIST | — | |
| delimiter | STRING | , | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |