[Book Tools] End Queue
One boolean that can stop your whole ComfyUI run
BTEndQueue is a kill switch. It has a single input - a boolean - and no outputs. Flip it to true while it's part of an active workflow and ComfyUI aborts the current queue. That's the whole node, and it's genuinely useful once you're running long automated batches.
Think of a book renderer cranking through twenty pages overnight. At some point you want the run to stop - because a check failed, because page ten came out wrong, because you've decided the batch is done. You can't be there to click the cancel button at 3 a.m., but you can wire a condition into this node and let it pull the plug for you.
How it works
Under the hood it's embarrassingly simple: when boolean is true, the node calls interrupt_processing() from ComfyUI's own nodes module. That's the same interrupt the frontend cancel button triggers - the sampler gets a stop signal mid-step and the queue unwinds. When the input is false, the node does nothing and passes silently.
Because it's an output node, ComfyUI treats it as an endpoint of the graph even though it produces no data. You hang it anywhere in the workflow; it doesn't need to sit at the end.
How a beginner uses it
You don't feed this node by hand - you feed it a computed condition. Common patterns:
- A comparison node detects the loop iteration hit a target page and outputs
true. - BTTextGrowth returns a growth percentage, you compare it against a threshold, and if the text can't fit at any reasonable size you abort instead of rendering garbage.
- Any validation node (empty prompt, missing file) flags
trueand the run stops before it wastes GPU time.
There's no wire from the boolean to "stop now" beyond the node being present and active - so if you toggle the checkbox to true, ComfyUI interrupts on the next evaluation. That's also the manual use: set the checkbox when you want a one-shot "stop the run" and just let the node sit in the graph.
Installing
The pack installs the usual way, with nothing heavy behind it:
cd ComfyUI/custom_nodes
git clone https://github.com/Big-Idea-Technology/ComfyUI-Book-Tools
# restart ComfyUI
Or use ComfyUI Manager and search "ComfyUI-Book-Tools". No models, no extra pip packages beyond what ComfyUI already ships.
One honest caveat
"Interrupt" means the current execution is cut off - whatever the sampler was mid-way through gets thrown away, and anything after it in the queue won't run. If you want to stop between pages rather than mid-generation, gate the condition instead (e.g., skip the sampler entirely by routing around it) rather than relying on this to be graceful. For a hard stop on a runaway batch, though, it's exactly the right tool.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| boolean | BOOLEAN | false | — |
Outputs (0)
No outputs