SRL Conditional Interrrupt
A kill switch that aborts the run
- inp
- output
ComfyUI has no real if/else. It executes every node you connect, and there's no built-in "if this, skip that." So when people want to stop a run because something went wrong, they spend weeks searching - and one of the answers that keeps coming back is this node. SRL Conditional Interrrupt is the closest thing to a conditional branch the graph can express: when a boolean input is true, it cancels the entire prompt, exactly like you'd hit the Cancel button.
That's genuinely useful. You can wire it up to abort a long batch when a quality check fails, bail out of a slow upscale when the input image is broken, or stop an AnimateDiff job the moment a mask comes back empty. Instead of babysitting the queue, you let the graph decide when to give up.
How it works
Two required inputs, one output. interrupt is a BOOLEAN with forceInput, which means you can't just type a value in - it has to come from another node's boolean output. inp accepts anything. If interrupt is true, the node calls ComfyUI's interrupt_processing() - the same internal hook the Cancel button uses - and the whole run stops. Then, in all cases, whatever you fed into inp comes out the output untouched.
Why the pass-through? Two reasons. ComfyUI needs every input wired before it'll run a node, so the inp wire is what forces the check to happen at the right point in your pipeline. And because the node still produces an output, your downstream wires stay valid - you don't have to rip half the graph apart when you add a kill switch. You can even use it purely for sequencing: wire a value through to guarantee execution reaches this spot, set interrupt false, and it acts as a checkpoint.
Inputs and outputs that matter
interrupt(BOOLEAN) - the condition. Wire in a true to stop, false to keep going.inp(any) - pass-through payload, whatever type your pipeline carries.output(any) - the same value, always returned.
That's the whole thing. It's a two-input primitive, not a router.
What it can't do
Say this loudly, because it's where people get burned: this node stops the whole prompt. It does not redirect execution down a different path - ComfyUI can't do that at all. If your workflow needs "if empty, go this way instead," you're not looking for an interrupt node; you're looking at bypass tricks or restructuring so the check happens before the expensive part. This one is for conditionally aborting, full stop.
One naming trap: the registered class name is literally "SRL Conditional Interrrupt" - three r's, a typo that's baked into the code. The menu displays it as "SRL Conditional Interrupt" (correctly spelled), so search "SRL" to find it. But if a workflow you download complains about a missing node by that mangled name, it's this one.
Install
The whole pack has zero dependencies beyond ComfyUI itself - it's four small Python classes. Either way:
cd ComfyUI/custom_nodes && git clone https://github.com/seanlynch/srl-nodes
then restart ComfyUI. Or skip the terminal: ComfyUI Manager → "Custom Nodes Manager" → search "SRL's nodes" (or "srl-nodes") → Install, then restart.
Troubleshooting
The most common confusion is the forceInput flag: if you expected a toggle you can click, you won't find one. The interrupt signal must come from another node - a boolean comparison, a condition-checking node, or anything else that emits true/false. If the run keeps stopping and you didn't mean for it to, follow the wire into interrupt and check what's feeding it. And remember it halts the entire prompt, not just the branch - that's by design, not a bug.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| interrupt | BOOLEAN | — | |
| inp | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output | * | — |