ComfyUI Node

Interrupt

The node that stops a Cyclist loop when your condition is finally met

By Pos13·Created 2 years ago·Updated 2 years ago· 33
Interrupt
  • any_in
  • *
stopfalse

If Cyclist gives you loops by re-queuing the workflow over and over, Interrupt is the node that decides when to quit. It's the if (done) break; of the whole pack. Without it your loop is a while (true) - you'd sit there manually cancelling the queue once the output looks good. Interrupt lets the workflow stop itself the moment a condition comes true: an image scored high enough, a counter hit its target, the upscale reached the resolution you wanted.

How it actually works

It's a pass-through with a kill switch. You drop it onto any link in your graph - the value flows in any_in and comes straight back out *, unchanged. That's it, until the stop flag goes true, at which point the node halts the current run instead of letting the rest of the graph execute. Because it sits on a wire and forwards the value untouched, you can slip it into a pipeline without rewiring anything downstream.

The catch is where you put it, and this is the part people get wrong. Interrupt only saves you compute if it fires before the expensive work. So place it in the path of whatever's heavy - right before the KSampler, say - not after. The author's own rule of thumb: the sweet spot is right after an important Reload or Recall node, because that's where you've just loaded last iteration's result and can test it against your stop condition. You also must place it downstream of whatever produces its any_in and stop inputs - ComfyUI won't run a graph where those inputs depend on the interrupt's own output, since that would be a cycle.

The inputs that matter

  • any_in (*, required) - the value passing through. Wildcard type, so it takes anything: an image, a latent, a model, whatever wire you're parked on.
  • stop (BOOLEAN, default false) - the trigger. Starts as a widget, but you'll almost always right-click and convert it to an input so you can drive it from a Compare Anything node. true stops the run.

Output is a single * - the same thing that came in on any_in. Feed it onward exactly as if the Interrupt weren't there.

Install

  • ComfyUI Manager: search comfyui-cyclist, install, restart.
  • Manual: cd ComfyUI/custom_nodes && git clone https://github.com/Pos13/comfyui-cyclist, restart ComfyUI.

Pure Python, nothing to download.

Where people get burned

A few real traps, all documented by the author:

  • Don't bypass it - disconnect its stop input instead. Bypassing an Interrupt node doesn't disable it the way you'd expect; if you want it off, unplug stop.
  • Reroutes and Primitives fight the wildcard input. The * type on any_in gets confused when a Reroute or Primitive sits in the way, and you can end up with mismatched in/out types. Wire it directly where you can.
  • You can (and often should) use more than one. Multiple Interrupts in a graph are fine and sometimes exactly what you want - one to catch "good enough," another to catch "gone wrong."

When it does fire, you get an on-screen message telling you the run was interrupted - that's expected, not an error. Pair it with Loop Manager set to by_interrupt_node and the loop id auto-advances on stop, so your finished result doesn't get overwritten by the next queued run.

One honest caveat: the pack is archived and the author has stepped back from maintaining it. Interrupt is genuinely the cleverest node in Cyclist and it still works, but if a future ComfyUI release changes how interrupts are raised, nobody's on the other end to patch it.

Categorycyclist

Inputs (2)

NameTypeDefaultDescription
any_in*
stopoptBOOLEANfalse

Outputs (1)

NameTypeDescription
**