NativeMultiPlaceholderPromptList
The Prompt Matrix Your Workflow Was Missing
- STRING
The classic way to compare variations in ComfyUI is to queue the same graph twelve times and change one word each run. Fine for two variations, miserable for nine. This node exists so you type a template once, list the values, and get every combination handed downstream as a list.
What it is and why you'd reach for it
NativeMultiPlaceholderPromptList is a prompt-matrix generator. You give it a prompt with {placeholders} in it, plus a list of values per placeholder, and it produces the full Cartesian product - every combination, as finished prompt strings.
It's the deterministic cousin of the {a|b|c} dynamic-prompt syntax from the A1111 era, where one prompt expands to a random pick per run. Wildcards sample alternatives; this node enumerates them. Good for "blue, red and black on my character, in blonde, brown and black"; bad for "give me surprise variety."
The author is upfront about where it came from: the pack is a set of utilities built to support XYZ-plot pipelines - the grid-of-everything workflows where you sweep a parameter across rows and columns. A prompt matrix is exactly what you need for the "what goes in the cells" half of that job.
How it works
First it collects your placeholder/value pairs, skipping any pair where either the placeholder or the value list is empty. Second it scans the template with a regex for everything shaped like {something}, and keeps only the pairs whose placeholder actually appears in the template. Third it runs itertools.product over the surviving value lists and does a <placeholder> → value string replace on a fresh copy of the template for each combination, then collapses whitespace.
Nice consequence: the last axis varies fastest. With {color} = blue, red, black and {hair} = blonde, brown, black you get blue/blonde, blue/brown, blue/black, red/blonde… - hair cycles inside color, which is how you'd read a spreadsheet anyway.
The "native" part is the point of this variant. Its non-native sibling MultiPlaceholderPromptList returns type LIST, a custom type that only nodes from packs that know about LIST can consume. This one declares a normal STRING output with OUTPUT_IS_LIST set, so core ComfyUI understands it: feed it into an ordinary single-value input - a CLIP Text Encode, a widget converted to an input - and the graph runs once per prompt, collecting the results. Your list becomes nine separate generations.
One cleanup step is baked in: newlines become spaces, empty entries get dropped, and an empty-string fallback means you can never hand a genuinely empty list downstream. Side effect - line breaks you deliberately put in a template won't survive.
The inputs that matter
Only three things you'll actually touch:
- Template - the prompt, with
{name}-style placeholders. The default,a girl in a {color} dress with {hair} hair, illustrates the idea fine. - placeholder1…3 and values1…3 - up to three axes, each pair being a marker and a list of values.
_empty_as a value inserts an empty string, which is how you make one combination of the matrix mean "without this thing." - values_separator -
,by default. Type the two literal characters\nto split values per line instead.
The output is a single STRING socket flagged as a list. Wire it to the text input of your positive encoder and let core handle the iteration.
Install
It ships in DemonAlone-nodes-ComfyUI, so no separate install:
cd ComfyUI/custom_nodes
git clone https://github.com/DemonAlone/DemonAlone-nodes-ComfyUI
# restart ComfyUI
Or search "DemonAlone-nodes-ComfyUI" in ComfyUI Manager. The dependency list is one line - piexif - and there are no model downloads. A pure utilities pack, so it's a cheap install.
Where people get burned
The placeholder must match exactly. A typo - {Colour} in the template, {color} in the value pair - is silently ignored. You don't get an error, you get one render of the raw template. If the node "isn't doing anything," check for a matching string first.
Multiline values box, comma separator. values1 is multiline, so it invites you to paste one value per line. With the default , separator the whole block becomes a single value. Either comma-separate on one line or set the separator to \n.
Combo explosion is multiplicative. 3×3 is nine renders, not six. A third axis with four values and you're at 36 sampler runs, and the queue does not care that you were just curious. Start with two axes.
Good luck finding it in the menu. Its display name has no spaces, unlike most of the pack's friendlier labels - search the exact name or browse utility/text/native. The author's description points at a StartLoop node for loop-style pipelines, but nothing extra is needed for the per-item execution above: plain list expansion does it.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| Template | STRING | a girl in a {color} dress with {hair} hair | Main prompt template. Use placeholders like {name}. Additional placeholders can be added below; all are equivalent and optional. |
| values_separator | STRING | , | Separator used for listing values (supports \n). Use \n for multi-line lists. |
| placeholder1 | STRING | {color} | First placeholder to replace. Optional and equivalent to other placeholders. |
| values1 | STRING | blue, red, black | Comma-separated list of values for the first placeholder. Use '_empty_' as a value to insert an empty string. |
| placeholder2 | STRING | {hair} | Second placeholder to replace. Optional and equivalent to others. |
| values2 | STRING | blonde, brown, black | Comma-separated list of values for the second placeholder. Use '_empty_' as a value to insert an empty string. |
| placeholder3 | STRING | Third placeholder (optional). | |
| values3 | STRING | Values for the third placeholder. Use '_empty_' as a value to insert an empty string in the final prompt. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |