Nodes/comfyui-adaptiveprompts/🎞️ Prompt Sequencer 🎞️
ComfyUI Node

🎞️ Prompt Sequencer 🎞️

Cycle every combination of your wildcards instead of rolling randomly

By AlectricitiΒ·Created 12 months agoΒ·Updated 23 days agoΒ· 87
🎞️ Prompt Sequencer 🎞️
  • context
  • prompt
  • context
β—„promptβ€”β–Ί
β—„seed0β–Ί
β—„modeFROM_STARTβ–Ί
β—„hide_commentstrueβ–Ί
β—„categorywildcardsβ–Ί

The regular Prompt Generator rolls a fresh random result every time it runs. Prompt Sequencer is its deterministic sibling: instead of gambling, it walks through every possible combination of your {brackets} and __wildcards__ in a fixed, repeatable sequence - one combination per execution. That's exactly what you want for exhaustively inspecting what's in a wildcard file, generating a full combinatorial grid, or building a simple frame-by-frame animation where each generation should be a known, distinct step from the last rather than a random jump.

How it works

mode picks how the sequence advances. FROM_START cycles the first wildcard fastest - think of it like an odometer read left to right, where the first wheel spins through its full range before the next one advances one step. FROM_END runs that same logic from the other direction, cycling the last wildcard fastest. PARALLEL advances every wildcard together in lockstep instead of nesting them, so wildcards with different numbers of options drift out of sync with each other as the sequence progresses.

The README is upfront about real limitations here, and they're worth knowing before you build around this node: wildcard file lookups only go one folder deep, brackets can nest indefinitely but random-count selectors like {2-3$$a|b|c} are disabled entirely (a randomized pick has no coherent meaning in a deterministic sequence), and variable context is not supported - the ^name assignment/retrieval system that works in Prompt Generator doesn't carry through here.

The inputs and outputs that matter

  • prompt - your multiline text with brackets and wildcards.
  • seed - still present, though its role is narrower here than in the random generator given the deterministic sequencing.
  • mode - FROM_START, FROM_END, or PARALLEL.
  • hide_comments - strips ##comment## blocks from the output, same as Prompt Generator.
  • category - which wildcards subfolder to draw from.
  • Optional context in, output context out - present in the schema, but see the limitation above before relying on it.
  • Output: prompt - the current step's resolved text.

How to install it

Comes with the rest of the pack. Search comfyui-adaptiveprompts in ComfyUI Manager, or install manually:

cd ComfyUI/custom_nodes
git clone https://github.com/Alectriciti/comfyui-adaptiveprompts

Restart ComfyUI. No models, no extra dependencies.

Common issues & troubleshooting

A prompt that worked in Prompt Generator breaks here. Random-count bracket selectors like {2-3$$a|b|c} simply aren't supported in sequencer mode - simplify to plain single-pick brackets ({a|b|c}) and ordinary __wildcard__ calls before porting a workflow over.

Variables from an earlier context aren't resolving. That's expected - context/variable support isn't implemented for this node per the README's stated limitations, even though a context socket exists on it. Don't build a workflow that depends on ^name variables surviving through a sequencer step.

The sequence only advances one step per queue. That's by design - it steps forward one combination per execution, not internally in a single call. Queue the same graph repeatedly (or use ComfyUI's batch/queue-count controls) to actually walk through the full combination space.

A nested wildcard folder isn't being found. Remember the one-folder-deep limit - if your wildcard structure relies on __environments/forest/deep__-style multi-level nesting that works fine in Prompt Generator, it won't resolve the same way here.

Categoryadaptiveprompts/generation

Inputs (6)

NameTypeDefaultDescription
promptSTRINGβ€”
seedINT00–18446744073709550000β€”
modeCOMBOFROM_START3 options: FROM_START, FROM_END, PARALLEL
hide_commentsBOOLEANtrueβ€”
categoryCOMBOwildcardsSelect which wildcards folder to use. Create alternate folders named 'wildcards_*' (eg. 'wildcards_fresh') inside the package root. defaults to the global '/wildcards/ if a file is missing'
contextoptDICTβ€”

Outputs (2)

NameTypeDescription
promptSTRINGβ€”
contextDICTβ€”