Circuit Breaker
Stop a queue run gracefully when things go wrong mid-workflow
- trigger
- passthrough
Circuit Breaker is a polite abort button for your workflow graph. You give it a trigger and a boolean status; if status is false, it halts the entire queue run cleanly - no stack trace, no error dialog, just a stop. If status is true, it passes the trigger straight through and the run continues as if the node wasn't there.
The README calls it "failing politely," which is exactly right. The name is borrowed from the circuit-breaker pattern in software engineering, and the behavior matches: instead of letting a bad value propagate downstream and blow up some expensive node, you detect the problem earlier and cut the run at a controlled point.
How it works
Mechanically, it's almost embarrassingly simple. When status is false it raises ComfyUI's own InterruptProcessingException - the same exception the cancel button triggers internally - so the queue stops without ComfyUI treating it as a crash. When status is true it returns the trigger unchanged out of the passthrough output, which is why you wire a real value (an image) in: the node needs to hand something forward so the workflow keeps flowing when the condition passes.
The input that matters is status (a BOOLEAN, default true). Everything else is plumbing: trigger is an IMAGE that rides through when the run is allowed to continue.
Why you'd reach for it
The canonical use from the README: skip an expensive upscale pass when an upstream quality check already says the draft is good enough. Wire the quality node's boolean into status, put the Circuit Breaker in front of the upscaler, and the queue halts early instead of spending ten minutes upscaling an image you're going to reject anyway.
It's also handy for batch jobs with a guard condition - if some external check fails partway through a long queue (a model server dropped, an input turned out empty), you stop the whole batch instead of letting every subsequent step fail one at a time.
Install
Via ComfyUI Manager (search "comfydv"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/darth-veitcher/comfydv.git
Restart ComfyUI; it's under dv/utils. No dependencies to speak of - the pack installs jinja2, pydantic, and pydantic-ai-slim automatically, but this node doesn't need any of them.
Gotchas
- It needs a boolean wired in to do anything. Default
status = truemeans the node is invisible until something upstream actually feeds it a condition. A common beginner trap is dropping it in, expecting it to auto-detect a problem, and wondering why nothing happens. - It stops the whole queue, not just one branch. That's the point, but if your workflow has independent sub-pipelines you don't want killed, this node isn't the right tool - put the guard condition on the branch itself instead.
- The trigger is an IMAGE here. The schema fixes the passthrough to images, so if you want to conditionally gate a string or a latent, you'll need to adapt - or just put the node right before an image-consuming step.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| trigger | IMAGE | — | |
| statusopt | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| passthrough | IMAGE | — |