Nodes/Shima/Shima Highway Bypass
ComfyUI Node

Shima Highway Bypass

Toggle a whole processing chain on or off without touching a wire

By KDB-USJP·Created 6 months ago·Updated 6 months ago· 2
Shima Highway Bypass
  • data
  • passthrough
  • bypass_state
bypass_state1
sync_input

Every ComfyUI user eventually builds a segment they sometimes want active and sometimes don't - a hi-res fix pass, a detailer, a filter chain - and the stock way to switch it is to select the nodes and hit Ctrl+B (mute) or Ctrl+M (bypass) every time. Shima's Highway system turns that into a structured toggle: Highway Bypass is the switch that lets you route a signal through a processing chain or around it, driven from the node's own UI or from another node's logic.

Mechanically, be clear about the split: the backend is a thin structural node - it passes whatever comes in out the other side and reports a state integer. The actual visual "road" and the bypass behaviour are driven by the frontend (shima_highway_bypass.js), which is what makes a segment of the graph appear to reroute. So this node is a structural hook for frontend control more than a computation: you place a Bypass before a chain, a terminator after it, and the JS does the road-building.

Inputs:

  • bypass_state (INT, 0/1) - the switch state. It's JS-managed in the widget (default 1), and the source comments frame it as 0 = road open, 1 = bypass. When a value isn't synced, the frontend drives it.
  • data (type *) - the signal to pass through; ANY type, so it doesn't care whether you're routing an IMAGE, LATENT, or MODEL.
  • sync_input (INT, optional) - an override input: if something is wired here, the state is computed from it (0 when true, 1 when false) instead of the widget. That's how another node gets to program the bypass - a boolean from a controller flips the road.

Outputs: passthrough (type *) - your data, unchanged - and bypass_state (INT), the state it settled on, so downstream logic can react to it.

Where this earns its keep: optional upscaling chains ("upscale on, upscale off"), A/B testing two prompt variations, or a ControlNet path you toggle by flipping one switch instead of muting six nodes. The Highway family works as a team - a Bypass to enter, a Detour to branch, a Merge to rejoin, a Terminator to stop propagation - and concepts.md frames the whole thing as conditional signal routing without disconnecting wires.

The trap to know about: because the routing is partly visual, a Bypass whose state you expect to be "obviously off" can leave downstream nodes muted in the UI while data still flows in the backend - or vice versa. When something stops showing up and you can't figure out why, check whether a Highway node is the gatekeeper and what state it's in. And since the backend only echoes the state, any real computation you expect from the bypass lives in the frontend handling - restart ComfyUI and hard-refresh if the road visuals go missing.

Install the pack via ComfyUI Manager (search "Shima") or

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

then restart. No models, no downloads.

CategoryShima/Utilities

Inputs (3)

NameTypeDefaultDescription
bypass_stateINT10–1
dataopt*
sync_inputoptINT

Outputs (2)

NameTypeDescription
passthrough*
bypass_stateINT