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

Sensor KSampler Switch

The Whole KSampler Input Panel, On a Switch

By Fossiel·Created 10 months ago·Updated 5 months ago· 1
Sensor KSampler Switch
  • model_true
  • model_false
  • positive_true
  • positive_false
  • negative_true
  • negative_false
  • latent_true
  • latent_false
  • model
  • positive
  • negative
  • latent
switch_modeltrue
switch_positivetrue
switch_negativetrue
switch_latenttrue

The rest of the sensor family switches one type at a time. This one switches the entire input panel of a KSampler at once - model, positive, negative, and latent - each with its own independent toggle. It's the node for the workflow that has two complete pipelines feeding into a single sampler, and you want to flip between them without rewiring four ports.

Say you're running an image-to-image workflow with two source latents, two conditioning branches, and two models (one for a draft pass, one for a refine pass). Wire pipeline A into the *_true ports and pipeline B into the *_false ports, and each of the four toggles decides which side wins. Because every input is optional, the sensor behavior still applies: if only one side of a port is connected, that side wins regardless of the toggle.

The four toggles

  • switch_model → picks model_true or model_false
  • switch_positive → picks positive_true or positive_false
  • switch_negative → picks negative_true or negative_false
  • switch_latent → picks latent_true or latent_false

Outputs mirror the input panel: model, positive, negative, latent - wire them into a KSampler and you're done.

Why the latent toggle matters here too

The latent port on this node inherits the same fix as the pack's Sensor Switch Latent: it preserves the full latent dictionary (so noise masks and batch indices survive) and converts WAN 2.1/2.2 latents back to raw format before outputting. The changelog shows this was specifically fixed in the Oct 2025 update, and the 2025/10/31 update extended the switch to cover all KSampler and KSampler (Advanced) input ports - which is why you get the full four-port panel rather than a partial one. If you're building Wan or inpaint workflows with a dual-pipeline setup, this is the version that doesn't corrupt the latents.

The standard caveat

Same family rule: ComfyUI can pass data through a bypassed node, so with both sides wired the sensor won't reliably auto-detect a bypass - use the toggles for that. And note these are four independent switches: flip them all together or mix and match, but don't assume one master toggle controls the whole panel. They default to true, so the *_true side wins out of the box.

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 KSampler Switch under Fossiel/QoL. No models, no downloads - pure routing, and the most capable node in the sensor family.

CategoryFossiel/QoL

Inputs (12)

NameTypeDefaultDescription
switch_modelBOOLEANtrue
switch_positiveBOOLEANtrue
switch_negativeBOOLEANtrue
switch_latentBOOLEANtrue
model_trueoptMODEL
model_falseoptMODEL
positive_trueoptCONDITIONING
positive_falseoptCONDITIONING
negative_trueoptCONDITIONING
negative_falseoptCONDITIONING
latent_trueoptLATENT
latent_falseoptLATENT

Outputs (4)

NameTypeDescription
modelMODEL
positiveCONDITIONING
negativeCONDITIONING
latentLATENT