Nodes/comfyui-obvpm/Lazy Switch 3 Values (obvpm)
ComfyUI Node

Lazy Switch 3 Values (obvpm)

The model, the CLIP and the VAE, all or nothing

By chanon·Created about a month ago·Updated a day ago· 40
Lazy Switch 3 Values (obvpm)
  • on_false_value_1
  • on_false_value_2
  • on_false_value_3
  • on_true_value_1
  • on_true_value_2
  • on_true_value_3
  • value_1
  • value_2
  • value_3
booleantrue

Same node as Lazy Switch 2 Values, with a third slot. One boolean, three values, all from the same side.

If you haven't read the two-value entry: the mechanism is a lazy switch - the selected side executes, the other side's upstream nodes don't run at all - applied to a fixed set of pins rather than a single value. True takes on_true_value_1/2/3, false takes on_false_value_1/2/3, and they come out as value_1, value_2, value_3. Unconnected slots on the selected side output None instead of erroring.

Why three

Because the standard modern model trio is three. MODEL, CLIP and VAE are the three things a checkpoint loader hands you, and they're three things that must come from the same checkpoint. Mix them - a Flux VAE on an SDXL model, a text encoder from a different family - and you don't get an error, you get a plausible-looking image that's quietly wrong, or colour that's almost right, or a compatibility error deep in the sampler that costs you an evening.

Two other configurations come up a lot:

  • Image, mask and the reference: any inpainting-adjacent branch where the three have to correspond.
  • Latent, conditioning and a guide image: the modern regional/detail paths want a set, and a set from the wrong branch is worse than nothing.

Three is the sweet spot in practice. Four-plus and the node gets wide enough that people start bundling instead - which this pack also does, with the Bundle/Unbundle pair, and that's the better tool when the group of values is large or you want to hand it around as one wire.

Inputs and outputs

boolean (required, connectable), then the six optional wildcard inputs in true/false pairs, and three wildcard outputs value_1 through value_3.

Behaviour worth knowing before you rely on it

All slots switch together. You can't take slot 1 from the true side and slot 3 from the false side. That rigidity is the feature - it's what stops the trio from drifting apart.

Laziness is per-side, not per-pin. Only the selected side is requested from the engine, so the unselected trio's upstream nodes are skipped entirely and cost nothing. But nothing here is type-aware: the pins are wildcards, and a mismatch is a downstream problem, not a red wire.

None is quiet. If the selected side has nothing on value_3, you get None, and whatever consumes it will complain - or won't. None into a required input errors; None into an optional input means "not connected," which a tolerant node will happily interpret as "skip this." If a run silently does less than you expected, that's the first place to look.

The sink at the end still runs. Lazy evaluation prunes upstream work; it can't prune an output node. A Save or Preview with any live path into it executes regardless, which is the recurring gotcha in this whole family - pruning the branch and killing the sink are two different jobs.

Install

Manager, search comfyui-obvpm. Or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/chanon/comfyui-obvpm

Restart. No Python dependencies - the pack declares none, since everything it imports already ships with ComfyUI - and no model files. Every node in it carries an (obvpm) suffix, so typing obvpm into the node search menu lists the lot.

Categoryobvpm/switches

Inputs (7)

NameTypeDefaultDescription
booleanBOOLEANtrueSelects which side to execute and output: true = the on_true_value inputs, false = the on_false_value inputs.
on_false_value_1opt*Output as value_1 when boolean is false. Only executes while selected; may be left unconnected.
on_false_value_2opt*Output as value_2 when boolean is false. Only executes while selected; may be left unconnected.
on_false_value_3opt*Output as value_3 when boolean is false. Only executes while selected; may be left unconnected.
on_true_value_1opt*Output as value_1 when boolean is true. Only executes while selected; may be left unconnected.
on_true_value_2opt*Output as value_2 when boolean is true. Only executes while selected; may be left unconnected.
on_true_value_3opt*Output as value_3 when boolean is true. Only executes while selected; may be left unconnected.

Outputs (3)

NameTypeDescription
value_1*The selected side's value for this slot. None when that slot is unconnected.
value_2*The selected side's value for this slot. None when that slot is unconnected.
value_3*The selected side's value for this slot. None when that slot is unconnected.