Nodes/ComfyUI-Texturaizer/Switch Any (Texturaizer)
ComfyUI Node

Switch Any (Texturaizer)

The humble boolean if/else, but it'll carry any type

By LatentSpaceDirective·Created 2 years ago·Updated 8 months ago· 22
Switch Any (Texturaizer)
  • on_true
  • on_false
  • *
booleantrue

ComfyUI's graph is all about conditionals, but stock ComfyUI doesn't ship a plain "if this, take that" node - which is why every pack ends up writing one. Switch Any (Texturaizer) is this pack's: a dead-simple boolean switch that passes through one of two inputs unchanged. The "Any" is the selling point - both inputs and the output are wildcard-typed, so it can carry an IMAGE, a MODEL, a conditioning, a dictionary, whatever, without you ever casting types.

Context: Texturaizer is a paid Blender addon by Luke Kratsios (LatentSpaceDirective); these nodes are its free ComfyUI companion pack. This is a utility node that has nothing to do with Blender - it's just here because the pack's data-driven graphs need switches everywhere.

Inputs and output

  • on_true (*) - returned when the condition is true.
  • on_false (*) - returned when the condition is false.
  • boolean (BOOLEAN, default true) - the condition.
  • Output: * - whichever branch you chose, passed straight through.

That's the entire node. It's the same shape as the well-known WAS Node Suite / rgthree boolean switches, in case you've seen those - this one just lives in the Texturaizer pack.

Where it earns its keep

In a Texturaizer graph the classic wiring is a BOOLEAN from one of the Get * Data nodes driving the decision. A few I've seen work well:

  • use style from Get Style Data → switch between the style-conditioned branch and the plain branch.
  • use sdxl from Use SDXL? → route to the SDXL checkpoint/latent path or the SD 1.5 path.
  • Toggling between a fresh Empty Latent and a loaded image for img2img-style passes.

Because it's not lazy (unlike the pack's Switch Lazy), both inputs get evaluated before the choice happens. For a batch pipeline that's usually fine - but if one branch is expensive, like a full sampler, lazy evaluation matters and you want the lazy or smart sibling instead.

Install

Pack-level, once:

cd ComfyUI/custom_nodes
git clone https://github.com/LatentSpaceDirective/ComfyUI-Texturaizer

or ComfyUI Manager → search "Texturaizer" → Install → restart. Stock dependencies, no models.

The honest take

Switch Any is not a node you'll write home about, and that's fine - it's the duct tape of the graph. The one thing to remember is that both sides are always computed, so don't use it to "save" work; use it to route work. If you're choosing between a handful of options rather than two, skip it and go straight to Switch Lazy or Switch Smart - the index-based and key-based selectors - because a pile of nested two-way switches is how graphs become unreadable.

CategoryTexturaizer

Inputs (3)

NameTypeDefaultDescription
on_true*
on_false*
booleanBOOLEANtrue

Outputs (1)

NameTypeDescription
**