ComfyUI Node

Prompt Pair Concat

The zip that pairs your lists element by element

By opvelll·Created 2 years ago·Updated about 16 hours ago· 1
Prompt Pair Concat
  • list_a
  • list_b
  • list
separator,
isClean
trailing_separator

Every other node in this pack is a cartesian product - everything meets everything. Prompt Pair Concat is the deliberate exception: it zips. Given list_a = ["smiling", "angry", "sad"] and list_b = ["blonde_hair", "crown", "beach"], it produces exactly three strings: "smiling, blonde_hair", "angry, crown", "sad, beach" - position 0 with position 0, position 1 with position 1, and so on. The author's README calls it "like the zip function," which is exactly right.

That makes it the node you reach for when your two lists are already aligned - a subject list and a matching style list where the pairing is the point, not every cross-product. Get this and the cartesian nodes mixed up and you'll stare at a handful of prompt pairs wondering where the other 21 went.

The controls that matter

  • separator - joins the two halves. Default "," with no space, so if you're building sentence-style prompts change it to ", ".
  • isClean - trims whitespace and collapses duplicated separators inside each element before joining. Defaults to on (true), and it's the setting to reach for when your lists came from ragged text files with stray commas and spaces.
  • trailing_separator - appends the separator to the end of each output string. Defaults to off (false). The README frames it for prompt-building: emit "smiling, blonde_hair," so a downstream node can keep appending more tags.

list_a and list_b are optional LIST inputs, and the output is one LIST of the combined strings.

Where people get burned

  • It is not a cartesian product. That's the #1 mixup in a pack full of products. If your two lists are meant to be combined exhaustively, use TextListProduct or ProductedString instead.
  • Uneven lists don't error. The node pads the shorter list with empty strings, so the tail of the longer list survives on its own - list_a with five items and list_b with two gives you two pairs plus three solo entries. Often what you want, occasionally a surprise.
  • isClean and trailing_separator are string dropdowns ("true"/"false"), not real booleans - a small quirk of this node's wiring, but harmless.
  • LIST inputs are forced, same as the rest of the pack - connect a list-producing node, don't try to type values in.

Install

ComfyUI Manager → Install Custom Nodes → search "Comfy UI Text List Product", or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/opvelll/ComfyUI_TextListProduct

Restart ComfyUI. No dependencies or model downloads - pure stdlib Python.

If your lists are already the same length and position means something, this is the honest workhorse of the pack: no explosion, no ordering gotchas, just aligned concatenation with the cleaning and trailing-separator helpers built in.

CategoryTextListProduct

Inputs (5)

NameTypeDefaultDescription
separatorSTRING,
isCleanCOMBO2 options: true, false
trailing_separatorCOMBO2 options: false, true
list_aoptLIST
list_boptLIST

Outputs (1)

NameTypeDescription
listLIST