Nodes/ComfyUI Impact Pack/Queue Trigger (Countdown)
ComfyUI Node Runs on cloud

Queue Trigger (Countdown)

Auto-queue a fixed number of runs

By ltdrdata·Created 3 years ago·Updated 4 months ago· 3,248
Queue Trigger (Countdown)
  • signal
  • signal_opt
  • count
  • total
count0
total10
modetrue

This is one of Impact Pack's loop-hack nodes. Queue Trigger (Countdown) makes ComfyUI queue itself another run - but only a set number of times, counting down as it goes. Set the total, and each execution adds one more prompt to the queue and decrements the counter, until the count runs out and it stops. It's a way to fake a "run this workflow N times automatically" loop before ComfyUI had any real loop construct.

Be honest about what this is: an experimental utility that lives in a category literally named _for_test. It predates ComfyUI's own batch-count and looping features, and the wider community barely talks about it - a couple of targeted searches for it turn up almost nothing. It still works, but if you just want to run a workflow several times, the batch count in the queue menu is the boring, reliable answer. Reach for this only when you're building a genuine self-driving loop that needs to stop after a fixed number of iterations.

How it works

The node holds a count and a total. Per the README: like the plain Queue Trigger it adds a run to the queue, but only while the count is above 1, and it decrements by one each time it fires. So it acts as a countdown - kick it off and it re-queues itself the right number of times, then quietly stops instead of looping forever. It's an output node, meaning it actually executes as an endpoint rather than needing something downstream to pull on it.

The inputs and outputs that matter

  • total (default 10) - how many iterations you want. The ceiling of the countdown.
  • count - the live counter that ticks down each run. You generally start it and let the node manage it.
  • mode (boolean) - enables/gates the trigger; use it to switch the auto-queuing on or off without deleting the node.
  • signal (optional, wildcard) - a pass-through to control when this fires relative to the rest of the graph.

Outputs are signal_opt (the pass-through, for ordering), plus count and total as integers so you can display or reuse them. The ordering output matters here: you want the trigger to fire at the end of the workflow, after everything else has run.

How to install it

Part of the Impact Pack. ComfyUI Manager: search ComfyUI Impact Pack, Install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack comfyui-impact-pack
cd comfyui-impact-pack
pip install -r requirements.txt

then restart. No models needed.

Common issues & troubleshooting

It queues forever / never stops. The countdown only decrements when the node actually executes each cycle, so if the counter isn't being driven down as expected, check your total and that mode is set correctly. The README's own Control Bridge notes are the relevant warning for this whole family: these queue-manipulating nodes don't behave reliably when the batch count is above 1, or when a seed randomizes before the trigger runs.

It fires too early and re-queues mid-workflow. Sequence it last. Use the signal pass-through so the trigger executes after the rest of the graph has finished - the pack's guidance is explicitly to put Queue Trigger, Set Widget Value, and similar actions at the end of the workflow.

You just wanted to run it a few times. Then skip this node entirely and use ComfyUI's built-in batch count in the queue prompt menu. Queue Trigger (Countdown) is for building actual iterative loops, not for the everyday "give me 8 images" case - and being an experimental _for_test node, it's fussier than the built-in.

CategoryImpactPack/Logic/_for_test

Inputs (4)

NameTypeDefaultDescription
countINT00–18446744073709550000
totalINT101–18446744073709550000
modeBOOLEANtrue
signalopt*

Outputs (3)

NameTypeDescription
signal_opt*
countINT
totalINT