Nodes/zer0 Comfy Utilities/List Combine Node (zer0)
ComfyUI Node

List Combine Node (zer0)

Take a list of prompt chunks and turn it back into one string

By zer0thgear·Created 2 years ago·Updated 2 years ago· 1
List Combine Node (zer0)
  • input_list
  • Combined String
combine_last_x_items1
separator BREAK

Some nodes hand you a list of strings, and most of ComfyUI's text inputs want a single string. The List Combine Node (zer0) is the bridge between the two: it takes a list, joins every item with a separator you choose, and spits out one combined string. That's the whole job, and it does it without drama.

Its home turf is the prompt-splitting workflow. This node comes from the same pack as the Prompt Minimizer And Splitter, and the README says it plainly: it's "intended for use with a tokenizer + prompt splitter." You split a long prompt into token-sized chunks, then recombine them with BREAK so the CLIP encoder treats each chunk as its own unit. It'll join anything that returns a list of strings, though - it's not picky.

How it works

Under the hood it's a one-liner: separator.join(input_list). The interesting part is that input_list is a wildcard (*) input marked as a list, which is ComfyUI's way of saying "give me all the items at once, not one item per graph run." That's why the wire into it comes from a splitter or a list-returning node, not from a plain text box. The separator and the integer control arrive alongside it, and everything gets joined in list order.

Three inputs, and only the middle one will ever surprise you:

  • input_list - the list of strings to concatenate. Wire it from whatever produced the list.
  • combine_last_x_items - default 1. If you set it higher, the last X items get mashed together with no separator first, then the whole thing is joined. The tooltip calls it out: it exists "for correcting unnecessary separators." If your splitter leaves a trailing empty tag, bumping this to 2 swallows it instead of leaving a stray BREAK at the end.
  • separator - default " BREAK ", with the spaces. This is the string inserted between every item. Change it to ", " and the node quietly becomes a list-of-tags joiner.

There's one output: Combined String, a plain STRING you can feed into a CLIP Text Encode, a prompt widget, or anything else that eats text.

A word about BREAK

The default separator is a CLIP-era tool. BREAK forces a split at the 77-token chunk boundary, and it does real work on the SD 1.5/SDXL lineage - Illustrious, Pony, NoobAI, WAI and friends. On LLM-encoded models (Flux 2 Klein, Z-Image, Anima) there is no chunk boundary left to break against, so BREAK in the joined string is basically inert. If you're on a modern model and you only joined for bookkeeping, swap the separator for ", " and move on.

Install

Same story as the rest of this pack - no models, no heavy dependencies, just one Python package:

cd ComfyUI/custom_nodes
git clone https://github.com/zer0thgear/zer0-comfy-utils

Restart ComfyUI and the node appears under the text utility category. Easier still: ComfyUI Manager → Install Custom Nodes → search "zer0 Comfy Utilities" and let it handle everything, including the pack's single tiktoken dependency. If you cloned by hand, run pip install -r requirements.txt from inside custom_nodes/zer0-comfy-utils - a missing tiktoken breaks the whole pack's import, not just the splitter that uses it.

This is a small personal pack (the author calls it "dubiously useful nodes that I've made for my own use"), last touched in early 2025, so don't expect weekly updates. For a job this small, that's fine - the node is four lines of logic. It won't rot.

Categorytext utility

Inputs (3)

NameTypeDefaultDescription
input_list*The list of strings to concatenate
combine_last_x_itemsINT11–999If greater than 1, the last X items in the list will be combined before concatenating. Useful for correcting unnecessary separators.
separatorSTRING BREAK The separator to use when concatenating the list

Outputs (1)

NameTypeDescription
Combined StringSTRINGThe combined list as a single string