Nodes/ComfyUI-Jax-Nodes/Conditional Select
ComfyUI Node

Conditional Select

The if/else node your ComfyUI graph is missing

By Kebolder·Created 9 months ago·Updated 9 months ago· 0
Conditional Select
  • true_value
  • false_value
  • value
condition

Conditional Select is a plain if/else for your graph, and that's the whole pitch. You feed it a boolean condition, plus a true_value and a false_value, and it hands back whichever one the boolean picks. No API calls, no model downloads, no dependencies - three inputs, one output, done. Despite the JAX_ class name, it has nothing to do with Google's JAX machine-learning library; that prefix is just this pack's branding.

The node exists because ComfyUI's stock nodes have no native "if/else" for arbitrary values. Want to swap between two models, two latents, two prompts, or two images depending on something you decided mid-workflow? Normally you're scrounging through switch packs. This one is the minimal version: the inputs are typeless (*), so whatever you wire in comes back out unchanged on the other side.

Mechanically it's a passthrough - true_value if condition else false_value, exactly what you'd write in Python. Nothing gets transformed or cached. That simplicity is the feature.

Where people get burned: both branches still execute. ComfyUI is a dataflow graph, not a programming language. The node can't know what to pass through until its inputs exist, so anything wired into false_value runs even when the condition is true and you're clearly using true_value. Don't reach for this to skip an expensive sampler or a big upscale pass - that branch will run anyway, and you'll just waste the compute. Use it to choose between values that are already being computed. (The flip side of the ecosystem's notorious "Anything Anywhere" nodes is exactly this kind of fussy distinction: it's a switch, not a short-circuit.)

The other thing to know: condition is a strict boolean. If your graph produces an int or a float, you'll need a comparison node to turn it into a true/false before it'll plug in cleanly.

Inputs and outputs

  • condition (BOOLEAN) - the switch. Wire it from a boolean widget, another node's comparison, or anything that outputs a true/false.
  • true_value (*) - returned when condition is true.
  • false_value (*) - returned when condition is false.
  • Output value (*) - whichever branch won, in the same type you fed in.

Installation

It ships in the ComfyUI-Jax-Nodes pack. Easiest route is ComfyUI Manager - search "ComfyUI-Jax-Nodes" and hit install, then restart ComfyUI. Or do it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/Kebolder/ComfyUI-Jax-Nodes

Restart ComfyUI and you're done. There's no requirements.txt and nothing to download - this is one of the rare packs that doesn't drag half of PyPI in with it. One caveat: it uses ComfyUI's newer extension API, so it wants a current build (late 2025 or later). The pack is small and lightly maintained (last touched December 2025), so don't expect a constant stream of updates - it's a tiny utility, and that's fine.

Look for it in the node menu under logic. There are fancier conditional routers out there, but if all you need is "pick one of these two, based on this boolean," this is the one you reach for.

Categorylogic

Inputs (3)

NameTypeDefaultDescription
conditionBOOLEAN
true_value*
false_value*

Outputs (1)

NameTypeDescription
value*