Nodes/ComfyUI-Prompt-Combinator/πŸ”’ Prompt Combinator Merger
ComfyUI Node

πŸ”’ Prompt Combinator Merger

Join two Prompt Combinator outputs when eight lists just aren't enough

By lquesadaΒ·Created 2 years agoΒ·Updated about a year agoΒ· 59
πŸ”’ Prompt Combinator Merger
  • combination_ids_1
  • combination_ids_2
  • prompts
  • combination_ids
  • filenames
β—„prompts_1β€”β–Ί
β—„prompts_2β€”β–Ί

The base Prompt Combinator gives you eight input lists. That's a lot - until it isn't, and you're standing there wishing you had a ninth axis of variation. This node is the author's answer: it takes the output of two separate Prompt Combinator nodes and merges them into one list, so you can keep two independent combinator graphs and pipe both into a single workflow.

It's the simplest node in the pack, and the author added it barely a month after the pack's April 2024 launch, explicitly to answer the "how do I get more than eight lists" question. As he put it at the time: combinator A handles combinations from one set of fields, combinator B does the same, and you merge them into one list of prompts and ids "in order to pipe them through the same workflow."

How it works

Honestly? It concatenates. Nothing clever, no cross-products, no interleaving - it takes all of list one, then all of list two, in order. The inputs are exactly the outputs of two Prompt Combinator nodes:

  • prompts_1 and prompts_2 - the STRING lists.
  • combination_ids_1 and combination_ids_2 - the matching PROMPTCOMBINATORIDS lists.

The outputs are the same trio the combinator produces - prompts, combination_ids, filenames - so whatever you were feeding from one combinator (CLIP Text Encode, Export Gallery, Random Prompt) accepts the merged result unchanged. That's the whole appeal: it's drop-in.

One subtlety worth knowing, because it's the kind of thing that bites later: the merged filenames are re-tagged so ids from the first combinator get an input_merge_1_ prefix and ids from the second get input_merge_2_. Without that, the two halves of a merged list would collide on filenames - every combination that had no explicit id would want the same filename. The ids themselves are passed through untouched, so your combination_ids stay exactly as the upstream combinators produced them.

When would you actually use this?

Two real cases. First, more than eight lists: split your axes across two combinators and merge. Second, and more interestingly, two independent prompt axes that you want to keep in separate graphs - say one combinator manages subject/outfit/background for a character sheet while another manages lighting/camera/pose, and you want to run both batches through the same sampler without rebuilding one giant list. Since the merger also chains (its output is the same type as its inputs), you can stack combinators to go well past eight lists if you're feeling reckless.

It's also a good answer to a workflow-sharing problem: other people's JSON workflows reference "merge" nodes all the time, and this one is trivial to reason about when you inherit someone else's graph.

Install

Same pack, same path as every other node here - ComfyUI-Manager (search "ComfyUI-Prompt-Combinator") or:

cd ComfyUI/custom_nodes
git clone https://github.com/lquesada/ComfyUI-Prompt-Combinator.git

Restart ComfyUI and it's there. No model downloads, no extra dependencies. The only real warning is the pack's CC BY-NC-SA 3.0 (non-commercial) license - fine for personal work, not for reselling the output or the workflows.

If all you need is one combined list, this is the node. If you wanted a cartesian merge of two combinators - every prompt from A crossed with every prompt from B - that's not what this does; put all the lists into a single combinator instead.

Categoryprompt_combinator

Inputs (4)

NameTypeDefaultDescription
prompts_1STRINGβ€”
combination_ids_1PROMPTCOMBINATORIDSβ€”
prompts_2STRINGβ€”
combination_ids_2PROMPTCOMBINATORIDSβ€”

Outputs (3)

NameTypeDescription
promptsSTRINGβ€”
combination_idsPROMPTCOMBINATORIDSβ€”
filenamesSTRINGβ€”