Nodes/ComfyUI_RaykoStudio/๐ŸฆŠ RS Any Switch
ComfyUI Node

๐ŸฆŠ RS Any Switch

Flip between models, images, or whatever, with toggles

By RaykosanยทCreated about a year agoยทUpdated 5 days agoยท 79
๐ŸฆŠ RS Any Switch
  • input_1
  • input_2
  • input_3
  • input_4
  • input_5
  • input_6
  • input_7
  • input_8
  • input_9
  • input_10
  • input_11
  • input_12
  • input_13
  • input_14
  • input_15
  • input_16
  • input_17
  • input_18
  • input_19
  • input_20
  • output
โ—„active_inputinput_1โ–บ

Most of ComfyUI's switch nodes are picky about types - an image switch won't pass a model, and a model switch is useless for text. ๐ŸฆŠ RS Any Switch (RSAnySwitch) doesn't care. It accepts anything: IMAGE, LATENT, MODEL, AUDIO, VIDEO, STRING. Up to twenty inputs, one active at a time, switched with a visual ON/OFF toggle per input. If you've ever rebuilt a workflow because you wanted to A/B two checkpoints or compare three upscalers, this is the node that stops that.

How it works

The backend is almost embarrassingly simple - which is the point. It declares twenty input_N slots of type * plus a hidden active_input string, and on execution returns whichever connected input is named active (falling back to the first non-empty one). The real work happens in the frontend: inputs appear automatically as you connect wires, get numbered and labeled with the source node's name, and each gets a toggle switch. Turning one on switches the others off. Disconnect a wire and its slot disappears, so a half-empty switch doesn't clutter the graph.

Because it's type-agnostic, it's the rare switch that works anywhere in a graph - in front of a KSampler for seed/model A/B, in front of a SaveImage for image selection, or in front of a CLIPTextEncode for prompt switching.

Inputs that matter

  • input_1 โ€ฆ input_20 - all optional, all *. Connect whatever you want to switch between. The first connection becomes active automatically.
  • active_input - a hidden string ("input_1" by default) the UI writes to; you don't normally touch it directly. Selection state is saved with the workflow, so your choice survives a reload.

Output: output - passes through whatever the active input is, unchanged.

How to install

Part of ComfyUI_RaykoStudio:

cd ComfyUI/custom_nodes
git clone https://github.com/Raykosan/ComfyUI_RaykoStudio.git

Restart ComfyUI, or install via ComfyUI Manager by searching "ComfyUI_RaykoStudio". No extra dependencies beyond the pack's standard requirements.

Common issues

  • The right input isn't active. Click the toggle on the one you want - the active slot shows a green-bordered status bar, and only one can be ON.
  • Output is None / nothing flows. If active_input names a slot that's now disconnected, it falls back to the first connected input. If nothing's connected at all, you get None, which will error downstream - that's the expected failure mode for a passthrough switch.
  • Stale labels. Node names are shown truncated to 20 chars; if you renamed something, hit the "UPDATE NAME" button.

The honest take: for serious A/B testing there are fancier routers (Impact Pack has a whole family), and if you're switching models you might prefer the pack's own RaykoModelsLoader presets. But as a dead-simple, any-type A/B switch, this is one of the easier ones to throw into a workflow without reading a manual.

Category๐ŸฆŠ RaykoStudio

Inputs (21)

NameTypeDefaultDescription
active_inputoptSTRINGinput_1โ€”
input_1opt*โ€”
input_2opt*โ€”
input_3opt*โ€”
input_4opt*โ€”
input_5opt*โ€”
input_6opt*โ€”
input_7opt*โ€”
input_8opt*โ€”
input_9opt*โ€”
input_10opt*โ€”
input_11opt*โ€”
input_12opt*โ€”
input_13opt*โ€”
input_14opt*โ€”
input_15opt*โ€”
input_16opt*โ€”
input_17opt*โ€”
input_18opt*โ€”
input_19opt*โ€”
input_20opt*โ€”

Outputs (1)

NameTypeDescription
output*โ€”