ComfyUI Node

Clip Switch

A-B your text encoders without rebuilding the graph

By HavocsCall·Created 2 years ago·Updated 9 months ago· 4
Clip Switch
  • Clip_1
  • Clip_2
  • Clip
  • Selection
Selection1

If you've ever wanted to flip between two checkpoints' text encoders mid-workflow without dragging a second branch of nodes around, this is the node. Clip Switch takes two CLIP inputs and hands one through based on a 1-or-2 selection. That's the whole job, and it does it with zero dependencies or model downloads.

Why you'd bother

A CLIP in ComfyUI is the text-encoder half of a checkpoint - the thing that turns your prompt string into the conditioning vectors the sampler steers by. It's separate from the MODEL (the denoiser). So Clip Switch is the right tool when you want to encode the same prompt with two different encoders and pick one on the fly. The classic example is SDXL's base-and-refiner dance, where you might want the refiner's encoder for one pass. Or you're A/B testing two checkpoints that share a latent space and want to see which one encodes your prompt better without re-cloning a pile of nodes.

How it works

The mechanism is embarrassingly simple - a Python match on Selection:

case 1: return (Clip_1, Selection,)
case 2: return (Clip_2, Selection,)

Inputs you'll actually set:

  • Selection - 1 or 2, nothing else. It's an integer, so you can drive it from any node that outputs an INT (a random seed node, a conditional, a slider), not just by clicking.
  • Clip_1 and Clip_2 - your two CLIP objects, straight from checkpoint loaders or CLIP loaders.

Outputs:

  • Clip - whichever one you selected. Wire this into a CLIPTextEncode node.
  • Selection - the number you picked, passed through. Handy if you want to read back which branch is active, or chain it into another decision.

Where people get burned

Two things trip up first-timers. First, Clip_2 is optional. If you leave it unwired and flip Selection to 2, the node cheerfully returns None - and the CLIPTextEncode downstream will throw a confusing error. Wire both inputs before you go experimenting.

Second, and this one surprises people: a switch doesn't skip computation. ComfyUI executes the graph upstream of any connected input, so the branch you aren't using still runs - the node just routes which result goes forward. If your goal is not running a heavy branch, mute or bypass it instead; a switch only chooses output, it doesn't save you compute.

And one name-collision heads-up: "Clip Switch" is a generic name other packs use too. If ComfyUI complains about a duplicate node class after install, one of your other packs owns the name and you'll want to uninstall one or use the search to find HavocsCall's version specifically.

Installing it

Find it in ComfyUI Manager by searching "HavocsCall", install, restart. Manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/HavocsCall/comfyui_HavocsCall_Custom_Nodes

Restart ComfyUI and you'll find Clip Switch under the HavocsCall/Switches menu. The pack has no requirements.txt and fetches no models - everything it touches ships with ComfyUI already, so install is instant.

CategoryHavocsCall/Switches

Inputs (3)

NameTypeDefaultDescription
SelectionINT11–2
Clip_1CLIP
Clip_2optCLIP

Outputs (2)

NameTypeDescription
ClipCLIP
SelectionINT