join (from LIST)
Join (from LIST) — turn a pile of strings into one string, with glue
- strings
- STRING
You've built a list of strings - prompt segments, tags, filenames, values pulled out of a file - and now you need them as one string with something between them. That's join (from LIST). It takes a Python LIST of strings plus a separator and concatenates them: sep goes between elements, never at the start or end.
The most obvious use is assembling prompts from parts: a list of tags joined with commas, or a list of prompt phrases joined with spaces to feed a text encoder. It's also how you turn a list of filenames into a single comma-separated value to pass somewhere that wants one string.
How it works
Under the hood it's Python's sep.join(strings), and that's worth knowing because the semantics are exact. ["a", "b", "c"] with sep=", " gives "a, b, c" - the separator is inserted between elements only. No leading or trailing separator. And empty elements are honored: ["a", "", "c"] with sep="," gives "a,,c". Nothing is dropped or cleaned for you.
One naming trap to flag: this is the from LIST variant, which takes a Python LIST as a single variable. The pack also has a StringDataListJoin that takes a native ComfyUI data list and is wired to process items as a batch. Don't grab the wrong one - if your source is a data list, use the data-list join; if it's a LIST variable, this is your node.
Inputs and outputs
Two required inputs:
strings- aLISTof strings. This is the thing you're joining.sep- the separator, aSTRINGthat defaults to" "(a single space).
Output is one STRING: the concatenated result. That wires straight into any text input - a prompt field, a filename builder, another string node.
Installing it
Ships in the Basic data handling pack by StableLlama. ComfyUI Manager: search "Basic data handling", install, restart. Manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/StableLlama/ComfyUI-basic_data_handling
The pack is pure Python - zero dependencies, no model downloads - which makes it a fixture in shared workflows that want string handling without an install saga. Under Basic/STRING in the menu.
Common issues
The separator default is a space, and people expect a comma. If you're building CSV or comma-separated values, set sep to "," explicitly - the default is just "put a space between things", which is right for joining words and wrong for joining data. The other classic: an empty string in your list produces doubled separators ("a,,c"). If your list comes from a split and you don't want empties, filter it first with the pack's filter nodes. And watch the LIST-vs-data-list distinction - connecting a data list here works visually but behaves differently than you expect, because a data list is a batch of individual values and a LIST is one variable holding many.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| strings | LIST | — | |
| sep | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |