Sensor Switch Conditioning
Switch Between Two Prompt Encodings, Sensor-Style
- conditioning_true
- conditioning_false
- conditioning
Conditioning is what your prompt becomes after a CLIP Text Encode - the actual object a KSampler consumes. This node is a two-way switch for exactly that type, with the same "sensor" behavior as the rest of the Fossiel switch family: if only one conditioning input is connected, that's what comes out; wire both and the boolean decides.
This is the node you reach for when you want to A/B prompts or swap between prompt styles without rebuilding the encode side of the graph. Build two conditioning branches - say a full descriptive prompt and a minimal negative-heavy one - wire both into conditioning_true / conditioning_false, and flip the switch to change direction. Or bypass one branch entirely and let the sensor route the live one.
Inputs and outputs
switch- boolean, default true.conditioning_true/conditioning_false- optional CONDITIONING inputs.conditioning- single CONDITIONING output.
Selection logic, straight from the source: one input present → it wins; both present → switch decides; none present → None, no error. Wire the output into a KSampler's positive or negative slot.
Why you'd want a conditioning switch at all
Two honest reasons. First, the negative prompt swap: a common workflow refinement is toggling a "quality boost" negative on for final renders and off for drafts - that's a two-input switch on the negative conditioning. Second, composition switching: some workflows keep several pre-encoded conditionings (a main subject encode, an IPAdapter-style reference, or an SDXL refiner split) and switch between them to vary a batch. A normal Primitive + math-hack can do this, but the sensor's "pick whichever is connected" behavior makes it a lot less fiddly when one branch is bypassed.
The standard caveat
Same family rule: ComfyUI can pass data through a bypassed node, so when both inputs are connected the sensor won't reliably auto-switch - set the toggle manually. Auto-detect is for genuinely disconnected inputs, and the node's refusal to crash on missing inputs is its quiet superpower while you're mid-graph.
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 Conditioning under Fossiel/QoL. Pure routing, no models, no downloads - one of the eight-node sensor family that shares a single implementation.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| switch | BOOLEAN | true | — |
| conditioning_trueopt | CONDITIONING | — | |
| conditioning_falseopt | CONDITIONING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | — |