π Dynamic Prompt List
A prompt list node that grows new input boxes on the fly (just don't forget the button)
- prompt_list
Ever want to test three, seven, or a dozen different prompts against the same seed, and got tired of either copying a Text Multiline node twenty times or wiring some prompt-switch contraption? That's the exact gap this node fills. Dynamic Prompt List is one box that holds any number of prompt fields - from 2 up to 50 - and hands them to the rest of your graph as a single Python list. It's a small utility, and it's honest about being one.
The name is accurate, which is more than you get with some nodes: there's no API, no key, no model download, no heavy dependency. The entire pack is one Python file and one JavaScript file.
How it works
The Python side is almost aggressively simple. The node reads your inputcount, then walks prompt_1, prompt_2, β¦ up to that number, strips whitespace from each, drops the empty ones, and returns what's left as a list. No trickery, no hidden state. You can read the whole logic in prompt_list_node.py in under a minute.
The interesting half lives in the browser. A tiny extension in web/js/dynamic_inputs.js adds an "Update inputs" button to the node. Click it, and it counts how many prompt_ slots currently exist on the canvas and adds or removes them until it matches the inputcount widget. That dynamic-slot trick is borrowed straight from the KJNodes and Comfyroll prompt-list patterns the README credits - it's a known, reliable approach, just implemented here in ~80 lines.
The inputs that actually matter
- inputcount (INT, default 5, min 2, max 50) - how many prompt fields you want. This is the knob you'll touch.
- prompt_1 / prompt_2 / β¦ (STRING, multiline) - the prompts themselves. The first is required, the rest appear as you click the button.
- prompt_list (the only output) - the list of non-empty prompts, wired to anything downstream that genuinely consumes a Python list.
Here's the trap, and it's a real one: on a fresh node you get inputcount = 5 but only two input slots actually exist (prompt_1 and prompt_2, per the node's registration). The other three don't materialize until you click Update inputs. Change the count to 7 and forget the button, and the node silently runs with just your first two prompts - it doesn't error, it just produces a shorter list than you asked for. Get into the habit of: set count β click button β connect. In that order.
Installing it
No dependencies to worry about, no requirements.txt in the pack. Either:
cd ComfyUI/custom_nodes
git clone https://github.com/razvanmatei-sf/serhii-prompt-list serhii-prompt-list
then restart ComfyUI - or, easier, open ComfyUI Manager β Install Custom Nodes and search "serhii-prompt-list" (it also shows up as "Dynamic Prompt List"). Restart either way. You'll see "π Serhii's Dynamic Prompt List Node Loaded" printed in the console when it comes up.
Where people get burned
The prompt_list output is typed STRING in the schema, but what's actually on that wire is a Python list. ComfyUI is loose about types, so the wire will connect almost anywhere - but a node expecting a single string will not know what to do with a list. This is the node's real sharp edge: it only helps you if what you're plugging into can iterate a list of prompts. If you just wanted to feed one prompt into a KSampler, this node is the wrong tool; grab it when you have a consumer that wants a batch, or when you're building variations to queue.
Other things worth knowing: empty prompts are stripped out, so list length won't always equal your input count. The button is a JS frontend extension, so it's exactly the kind of thing that can break when ComfyUI rewrites its UI layer (Nodes 2.0 already took out bigger fish than this). If the button ever stops appearing, hard-refresh the browser and check the browser console for JavaScript errors - that's where this extension lives. If the node itself doesn't show in the menu at all, restart ComfyUI fully and watch the terminal for a traceback.
Is it the one I'd reach for? If I need a quick, visual, adjustable prompt list and don't want to install a 200-node suite for it - yes. If I'm building something serious, I'd probably script the prompts instead. But for rapid-fire variation testing, this is a clean five-minute install that does exactly one job.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| inputcount | INT | 52β50 | β |
| prompt_1 | STRING | prompt | β |
| prompt_2opt | STRING | prompt | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompt_list | STRING | β |