Combiner
Prompt grid-walking without rebuilding your workflow
- prompt
- step
- total
- status
Combiner is the "generate variations without thinking" node. You give it three lists - characters, clothing, poses - and every time you hit Queue Prompt it hands you the next combination: Tohru, maid outfit, sitting, then Tohru, maid outfit, standing, and so on until it has walked the whole grid and wraps around. It's the structured, stateful cousin of the old {a|b|c} wildcard trick from the A1111 days, except it lives entirely inside one ComfyUI node, needs zero external tools, and remembers where it left off.
No API calls, no models to download, no pip install. It's a single pure-Python file. The only infrastructure it needs is a ComfyUI session to hold a counter in memory.
How it works
The node keeps one global counter in memory, keyed by a workflow_id string (default "default"). Each execution reads the counter, computes which item from each list to use, builds the prompt, then bumps the counter by one. It returns IS_CHANGED = NaN, which is ComfyUI's way of saying "never cache me" - that's how it forces a fresh combination on every queue run even if your inputs didn't change.
The three lists form a nested loop, and this is the one mechanic worth internalizing: the first category changes slowest, the last changes fastest. With characters = [A, B], clothing = [X, Y], poses = [1, 2] you get A-X-1, A-X-2, A-Y-1, A-Y-2, B-X-1… - a full Cartesian product, every combination exactly once. total tells you how many steps that is, and when the counter hits it, it wraps to step 1.
The inputs that matter
Required are just the three multiline lists and a separator (default ", "). The rest is mode control, and there are only two rules you need:
- Per category, priority is Random > Iterate > manual index. So
random_characteroverridesiterate_characterif you flip both on. - If any category is on Random,
totalbecomes0- there's no end to the sequence, which thetotaloutput signals by reading0.
The *_index inputs are for the boring fixed case (both toggles off). reset shoves the counter back to zero on the next run. And if you have several Combiner nodes that should advance independently, give each a distinct workflow_id - this is the single most common footgun.
The four outputs are prompt (wire it into any text input, typically CLIP Text Encode), step (1-based), total, and a human-readable status string. The status output is genuinely handy: it's exactly what you want shown in a preview node so you can tell which combo you're looking at.
Installing it
Either path works, and neither pulls dependencies:
cd ComfyUI/custom_nodes
git clone https://github.com/ilia-zykov/ComfyUI-iterationNode.git
then restart ComfyUI. Or search for "iterationNode" in ComfyUI Manager and install via Git URL. You'll find it under iteration → Combiner in the node menu. It ships a small line_numbers.js that adds line numbers to the multiline fields - the parser strips those [n] prefixes automatically, so don't bother cleaning them out of your lists.
Common issues
- Always the same prompt. At least one
iterate_*orrandom_*toggle has to be on; with all of them off it's intentionally static and uses*_index. - Two Combiner nodes stepping in lockstep. They share the
"default"workflow_id. Change it on one of them. - The counter reset itself. State lives in memory and dies with a ComfyUI restart. That's by design, not a bug.
- Old inputs linger after you edit the list. ComfyUI caches node definitions; delete the node and re-add it.
- Queueing the whole grid: set your queue size to
total, or use Auto Queue: instant.
The author's defaults are, shall we say, enthusiastic (Tohru, maid outfit, bikini) - swap them for your own. For building a quick character reference library - same person, many outfits and poses - it's the cheapest tool that does the job without scripting.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| characters | STRING | Tohru Kanna Lucoa | — |
| clothing | STRING | maid outfit school uniform casual clothes bikini | — |
| poses | STRING | standing sitting lying down jumping | — |
| separator | STRING | , | — |
| iterate_characteropt | BOOLEAN | false | — |
| iterate_clothingopt | BOOLEAN | false | — |
| iterate_poseopt | BOOLEAN | false | — |
| random_characteropt | BOOLEAN | false | — |
| random_clothingopt | BOOLEAN | false | — |
| random_poseopt | BOOLEAN | false | — |
| character_indexopt | INT | 00–999 | — |
| clothing_indexopt | INT | 00–999 | — |
| pose_indexopt | INT | 00–999 | — |
| resetopt | BOOLEAN | false | — |
| workflow_idopt | STRING | default | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| step | INT | — |
| total | INT | — |
| status | STRING | — |