Nodes/Shima/Shima Panel Switch
ComfyUI Node

Shima Panel Switch

The inline toggle that mutes a branch without deleting it

By KDB-USJP·Created 6 months ago·Updated 6 months ago· 2
Shima Panel Switch
  • data
  • sync_input
  • passthrough
  • boolean
switch_state0

Shima Panel Switch is the humble switch that makes Shima's routing ideas work. It sits inline on a wire - any wire, any type - and acts as a breakable joint. When it's on, the signal passes through. When it's off, the downstream branch is effectively muted, and the visual state of the switch tells you which way it's set. It's the "flip this one toggle instead of rewiring or deleting" pattern, and it's what lets you keep an optional ControlNet path or a second prompt variant sitting in a workflow, ready to be switched in with one click.

The key idea: it's a reroute with a state, not a normal node. The pack's own docs call it a "compact toggle without a title bar," designed as the companion to the Breaker node. You place it on the wire into a branch you might want to disable, and the Breaker (a physical switch rendered on the canvas) controls a whole group of Panel Switches at once. Flip the Breaker off and every connected switch flips, muting their branches. That's the "Highway"/breaker system in miniature: conditional routing without disconnecting a single wire.

How it works

The data input is a * wildcard - it accepts anything, IMAGE, MODEL, CONDITIONING, whatever - and passes it through unchanged when active. State lives in a hidden switch_state integer (0 = pass, 1 = bypass) that the frontend renders as the switch's visual position. There's also a sync_input for automation: connect a boolean to it and the node sets its state from the signal, so a scripted or computed value can drive the switch rather than a human clicking.

The boolean output is the useful part if you're not just muting: it mirrors the switch state as a real BOOLEAN (True when passing), so you can wire the switch's state into logic elsewhere - feed it to a Multi-State Indicator, an RGB Logic Array, or another node that wants to know which branch is live.

The inputs and outputs that matter

  • data - the signal to pass through (any type).
  • switch_state - hidden, set by the frontend; 0 = on, 1 = bypass.
  • sync_input - optional automation signal; when connected, it drives the state.

Outputs: passthrough (whatever data was, when active) and boolean (the state as a BOOLEAN).

How to install it

Ships in the Shima pack. ComfyUI Manager → search "Shima", or:

cd ComfyUI/custom_nodes
git clone https://github.com/KDB-USJP/shima_wf.git Shima

restart. Core deps install automatically; no model downloads.

Common issues & troubleshooting

"Bypassed" branch still runs. The bypass is a frontend behavior - the switch tells ComfyUI to mute the downstream segment, but the data is still returned. If a node downstream of the switch still executes, it's because it's connected to passthrough (which always returns the data) rather than sitting behind the muted branch. Muting works on the branch, not on this node's own output.

Switch doesn't respond to the Breaker. Panel Switches pair with their Breaker through the UI. If the breaker link is missing or a group regex is blocking it, the switch won't sync. Check the Breaker's group scope, or drive it manually via sync_input.

CategoryShima/Routing

Inputs (3)

NameTypeDefaultDescription
data*
switch_stateINT00–1
sync_inputopt*

Outputs (2)

NameTypeDescription
passthrough*
booleanBOOLEAN