Nodes/ComfyUI-Fossiel-QoL-Nodes/Sensor Switch Clip
ComfyUI Node

Sensor Switch Clip

A Switch for CLIP Models That Knows What's Connected

By Fossiel·Created 10 months ago·Updated 5 months ago· 1
Sensor Switch Clip
  • clip_true
  • clip_false
  • clip
switchtrue

Sometimes the thing you're switching between isn't an image - it's the CLIP model that encodes your prompt. That's what this node is for: a two-way switch for CLIP objects that, like the rest of the Fossiel sensor family, routes the input that's actually connected.

The real-world use is model juggling. If your workflow sometimes runs an SD 1.5 checkpoint and sometimes an SDXL one, the CLIP models differ, and you don't want to rewire the whole graph each time. Wire one checkpoint's CLIP into clip_true, another into clip_false, and flip the switch - or leave one branch bypassed and let the sensor pick the survivor. Because both inputs are optional, the node also refuses to error out when an input is missing, which makes it much friendlier than a stock switch while you're still assembling the graph.

Inputs and outputs

  • switch - boolean, default true. Routes clip_true when on, clip_false when off, if both are connected.
  • clip_true / clip_false - the two optional CLIP inputs.
  • clip - single CLIP output.

The selection logic is the same as every node in the family: one input connected and it wins outright; both connected and the boolean decides; neither connected and you get a None rather than a crash. Connect it straight into a CLIP Text Encode and the rest of the graph never knows a switch happened.

The one gotcha

Same as its siblings: ComfyUI lets data pass through a bypassed node, so the sensor can't always detect "bypassed" as "disconnected." When both inputs are wired - which is your normal toggle case - set the switch toggle by hand. The auto-detect is for the case where one branch is genuinely unwired.

Installing it

Manager search "ComfyUI-Fossiel-QoL-Nodes", or:

cd ComfyUI/custom_nodes
git clone https://github.com/Fossiel/ComfyUI-Fossiel-QoL-Nodes
pip install -r ComfyUI-Fossiel-QoL-Nodes/requirements.txt

Restart, find Sensor Switch Clip under Fossiel/QoL. No models, no dependencies beyond the pack's own requirements - this is pure routing logic. And if you're juggling checkpoints a lot, note the family also has a Sensor Switch Model; pair the two to swap both model and CLIP in one graph edit.

CategoryFossiel/QoL

Inputs (3)

NameTypeDefaultDescription
switchBOOLEANtrue
clip_trueoptCLIP
clip_falseoptCLIP

Outputs (1)

NameTypeDescription
clipCLIP