ComfyUI Node

Queue Stop JNK

A kill switch for your queue that can also play you a little tune

By AljnkΒ·Created about a year agoΒ·Updated 12 months agoΒ· 3
Queue Stop JNK
  • any
  • any
β—„stopfalseβ–Ί
β—„clean_allfalseβ–Ί
β—„soundnoneβ–Ί
β—„modeβ–Ύβ–Ί

Every ComfyUI user eventually wants the same thing: the ability to stop a run that's clearly going nowhere without having to watch it. "Queue Stop JNK" is that, with a couple of extras bolted on. Drop it anywhere in your graph, flip stop on, and the moment execution reaches it the whole run halts and the queue behind it dies too. It's a manual tripwire for "I don't want to wait ten more minutes to find out this batch was a mistake."

The mechanism is worth understanding because it tells you exactly how hard this stops. When mode is "stop" and stop is true, the node does three things in order: optionally plays a sound (see below), optionally wipes the entire prompt queue (clean_all), and then raises ComfyUI's InterruptProcessingException. That exception is the same one the Cancel button in the UI triggers - execution of the current graph stops dead, and the pending queue items are gone. Set clean_all to false and it still stops the current run but leaves anything queued behind it intact, which is the gentler option when you only want to abort this attempt.

The pass-through input any is the slightly weird part and it's what makes the node fit mid-graph. It accepts literally any type (it's typed *), does nothing with it except hand it straight to the any output. So you can wire it between, say, your KSampler output and a preview node: the wire keeps your graph connected and logically "complete," and the node sits there as a checkpoint you can arm or disarm by flipping stop. Set mode to "continue" and it's a pure pass-through, which is handy for keeping the node in the graph during a test run without it doing anything.

The sound options are a genuine nicety for long unattended batches, and they're generated with pygame, not from audio files:

  • normal - a single 1 kHz beep, 200 ms. "I finished" in its most minimal form.
  • alarm - three 1.5 kHz blasts, each a second long. The "something broke, come look" signal.
  • completion - an actual seven-note melody (rising at the end, it's a cheerful one).

No audio on your machine? It degrades gracefully to a console message, so don't worry about a crash.

Install: ComfyUI Manager β†’ search "JNK" β†’ Install, then restart. Or:

cd ComfyUI/custom_nodes/
git clone https://github.com/Aljnk/ComfyUI-JNK-Tiny-Nodes.git

Then restart. This node is the one member of the pack that genuinely needs pygame (the pack's requirements.txt installs it) - without it you just lose the sounds, not the stopping.

Gotchas: because it raises the interrupt exception, the current graph halts - anything after this node won't run. That's the point, but people drop it in and forget the wire is live, then wonder why their workflow stops at a random point. clean_all is a real nuke: it wipes the whole queue, not just items you've started. And note the node only checks stop when mode is "stop" - leave mode on "continue" and the toggle does nothing, which confuses exactly one person per graph. Be that person once, flip mode, move on.

CategoryπŸ”§ JNK

Inputs (5)

NameTypeDefaultDescription
any*β€”
stopBOOLEANfalseβ€”
clean_allBOOLEANfalseβ€”
soundCOMBOnone4 options: none, normal, alarm, completion
modeCOMBO2 options: stop, continue

Outputs (1)

NameTypeDescription
any*β€”