Nodes/ComfyUI-Apt_Preset/flow_judge_output
ComfyUI Node

flow_judge_output

Route one value to one of two paths

By cardenluo·Created 2 years ago·Updated 18 days ago· 309
flow_judge_output
  • data
  • true
  • false
judgetrue

The mirror image of flow_judge_input, also in this pack: instead of merging two candidate values into one output based on a condition, this one takes a single value and sends it down one of two output paths depending on a boolean. It's the node you reach for when you want one branch of your graph to run and the other to sit idle, based on something you decided upstream.

How it works

Feed anything into data (wildcard-typed), set judge, and the node forwards data unchanged to whichever output - true or false - matches the current boolean value. The other output presumably gets nothing that run, which is exactly the behavior you want for conditionally activating one half of a graph without touching the other: whatever's wired to the output that doesn't fire simply doesn't execute.

Pair it with flow_case_tentor (an image-shape/size boolean) or flow_ChangeDetector (a stability boolean), both elsewhere in this pack, to drive judge from an actual condition rather than a hand-set switch - that's the combination that turns this into real conditional branching instead of a manual toggle.

Inputs and output

  • data (required, wildcard) - the value to route.
  • judge (BOOLEAN, required, default true) - which path it takes.
  • true (output, wildcard) - receives data when judge is true.
  • false (output, wildcard) - receives data when judge is false.

Installing it

Search ComfyUI-Apt_Preset in ComfyUI Manager and install, or manually: cd ComfyUI/custom_nodes && git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git, then restart. The README's own dependency step is "double-click install.bat" - Windows-first, with no requirements.txt visible elsewhere, so on Linux/Mac open that file to see what it installs and mirror it manually in your ComfyUI venv. This node is pure logic and needs none of the pack's optional extras (GGUF, Advanced-ControlNet, nunchaku, downloaded models).

Common issues

If you're expecting both branches to run every time and only one does, that's the node working as designed - this is a router, not a duplicator. If you actually need the value available on both paths regardless of judge, this isn't the right node; you'd want a plain reroute or a bridge node instead.

Because data, true, and false are all wildcard-typed, ComfyUI won't validate that whatever's downstream of each output actually expects the type you're sending - check that manually, especially if the two branches lead to structurally different parts of your graph.

And the pack-wide caveat: this is one node in a large, actively developed package, and an import error anywhere in the pack can take this node down too. If it's missing after install, check the ComfyUI console at boot for the actual traceback rather than re-checking your workflow first.

CategoryApt_Preset/flow

Inputs (2)

NameTypeDefaultDescription
data*
judgeBOOLEANtrue

Outputs (2)

NameTypeDescription
true*
false*