Any CLIP Switch
Swap CLIP models by slot order instead of re-wiring
- clip_1
- clip
Any CLIP Switch returns the first connected CLIP input, by slot order, and feeds it to the clip output. It's for the situation where more than one text encoder is in play - a checkpoint's bundled CLIP here, a standalone SDXL or Flux text encoder there - and you want to pick between them without dragging the clip wire off every encode node in the graph.
This is the fallback-switch pattern the community knows from rgthree's Any Switch: no selector widget, first non-null input wins, wiring decides. Tojioo's version is typed, so it only accepts CLIP and there's no ambiguity about what comes out.
How it works
One socket, clip_1, to start; connect a second CLIP source and a clip_2 slot appears. At run time it collects every connected input that isn't None and returns the lowest-numbered live one. The None skip does the switching work: mute or bypass the node feeding clip_1 and its slot delivers None, gets skipped, and clip_2 wins without touching a control. Leave all slots empty and the node raises "no inputs connected" rather than outputting nothing.
Where you'd use it
- Bundled vs. standalone encoder. Checkpoint CLIP in
clip_1, a separate SDXL/Flux text encoder inclip_2, mute to flip. - Refiner-style flows. Different text encoders for different passes feeding the same encode chain.
- Fallback routing. Preferred encoder first, fallback second, graph decides.
Install
ComfyUI Manager → search "Tojioo Passthrough" → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Tojioo/tojioo_passthrough.git
Restart ComfyUI. No model files, no pip dependencies - the pack is lean Python plus a bundled frontend and is on the Comfy Registry under publisher tojioo.
Common issues
Slot order is the rule, as with every switch in this pack: a live clip_1 always beats clip_2, so a "wrong" encoder means the earlier slot's upstream is muted, bypassed, or unwired. Since this node selects rather than merges, keep your CLIP sources separate - if you want a single shared CLIP doing both positive and negative encodes, the pack's Dual CLIP Text Encode node is the one you want, not this. And keep at least one slot connected or the node errors on the canvas.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| clip_1opt | CLIP | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| clip | CLIP | — |