π Conditional Stop (nhk)
The Quality Gate That Silently Halts a Batch β Conditional Stop (nhk)
- input
- output
Conditional Stop (nhk) is a workflow kill-switch with manners. Wire a boolean into it - from an AI evaluator, a manual checkbox, a threshold comparison - and it either lets your data sail through or stops the run dead, depending on whether that boolean is true or false. True means continue; false means stop. It's a "quality check failed, don't waste the rest of the queue" gate.
This one is part of the pack's experimental image-evaluation family (the nhk/wip category, which the author flags as subject to change). The intended shape: an Image Evaluator looks at a generated image, decides pass/fail, and this node halts execution if the verdict is fail - before you burn fifty more generations on a broken prompt. Same idea works for a manual "approve this frame before the video pass" toggle.
How it works
The mechanism is ComfyUI's ExecutionBlocker. When the condition is false, the node returns an ExecutionBlocker(None) instead of your data - which tells the executor to stop propagating anything downstream of this node. The deliberately quiet part: None as the blocker message means no error dialog pops up. ComfyUI just treats the chain as dead and, importantly, batch-friendly: the queue doesn't abort with a scary red error, it simply stops pulling the blocked branch. That's a real design choice, and it's the right one for automated evaluation loops where an error popup would be noise.
When the condition is true, your input passes through untouched and execution continues normally.
Inputs and outputs
input- the pass-through value (any type). Whatever you want to keep flowing if the gate opens.condition- boolean.true= continue,false= stop. Defaulttrue.stop_message- a string shown when stopping (default "Quality check failed - stopping workflow"). Set it to something you'll recognize in the logs, like why you stopped.
Outputs:
output- your input, only if condition is true.status- a STRING with the execution status, so downstream (or you, in the console) can see what happened.
Installing it
Standard pack install:
cd ComfyUI/custom_nodes && git clone https://github.com/Enashka/ComfyUI-nhknodes
restart, or "NHK Nodes" from ComfyUI Manager. No extra deps beyond the pack's usual torch/numpy.
The trap, straight from the author's docs
ComfyUI executes backward from terminals - only chains leading into an OUTPUT_NODE=True node get executed at all. The author's own IMAGE_EVALUATION.md warns that if "nothing seems to run," it's because there's no terminal reachable from the evaluator branch. So when you build a stop gate, make sure the branch that's supposed to be stopped genuinely terminates in a real terminal (a Save/Preview), and test the false path once manually before you trust it with an overnight batch. Also keep in mind these WIP nodes may change while the pack resolves its pull-based execution quirks - pin the pack version if you're building something you'll rely on.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| input | * | Input to pass through or stop | |
| condition | BOOLEAN | true | True = continue, False = stop execution |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output | * | Input passthrough if condition is True, blocked if False |