ComfyUI Node

continue flow

A dead-simple kill switch for a whole branch

By StableLlama·Created about a year ago·Updated 4 days ago· 48
continue flow
  • value
  • value
selecttrue
message

The simplest kill switch you'll ever wire: when a boolean is False, everything downstream of continue flow simply doesn't run. Flip it back and the whole branch runs as if nothing happened. That sounds trivial, but it's the exact mechanism ComfyUI lacks out of the box - core nodes can't conditionally stop a pipeline, only branch on values. So when someone asks "how do I make the workflow show a message and abort if the input is empty?", the honest answer is: a node like this, plus a message.

It's from Basic data handling, StableLlama's zero-dependency pack, and it's one of the most useful flow-control nodes in the whole thing. The author himself, in an r/comfyui thread about stopping a run when a string is empty, said the hard parts were checking the value and then stopping the run - and this node is exactly the "stop" half of that recipe.

How it works

When select is True, the node passes value through untouched - pure passthrough, no-op. When select is False, it returns a special ExecutionBlocker, a mechanism from ComfyUI core. When ComfyUI sees an ExecutionBlocker, it aborts execution of everything downstream of that node. Nothing runs, nothing errors; the branch is just skipped.

The message input is the twist that makes it human. If you provide one, ComfyUI pops up a dialog with that text when the block triggers. Leave it empty and the block is silent - the branch quietly does nothing.

The inputs and the output

  • value (ANY) - whatever you want passed through (or blocked). Common choices: an image, a conditioning, a prompt string.
  • select (BOOLEAN, default True) - the switch. True = continue, False = block.
  • message (STRING, optional, default "") - shown in a dialog when the block fires. Empty for silent operation.
  • value (output, ANY) - your input, delivered only when the flow continues.

Installing it

Install Basic data handling from ComfyUI Manager (search the pack title), or:

cd ComfyUI/custom_nodes
git clone https://github.com/StableLlama/ComfyUI-basic_data_handling

Restart ComfyUI. Zero Python dependencies, no model downloads - this pack installs cleanly on any setup.

Troubleshooting

  • "My whole workflow stopped!" Then select was False and you asked for it - check what's driving select. The most common wiring mistake is an unconnected select (defaults to True, so that's safe) or feeding it a value that's accidentally False, like a not of something you thought was True.
  • "The dialog never appears." message only matters when the flow is blocked. If select is True, no dialog, no block - it's working as designed. Also, the dialog is a UI feature; if you run ComfyUI headless via the API, expect the block to behave like a silent stop instead.
  • This blocks, it doesn't substitute. If you want "when the condition is false, use a default value instead of stopping," that's if/elif/else, not this node. ContinueFlow's whole job is stopping.
CategoryBasic/flow control

Inputs (3)

NameTypeDefaultDescription
value*
selectBOOLEANtrue
messageoptSTRING

Outputs (1)

NameTypeDescription
value*