Nodes/Shima/Shima Highway Merge
ComfyUI Node

Shima Highway Merge

The off-ramp that brings your split back together

By KDB-USJP·Created 6 months ago·Updated 6 months ago· 2
Shima Highway Merge
  • Route_1
  • Route_2
  • passthrough
merge_state0
label_1MERGE RT 1
label_2MERGE RT 2

Shima Highway Merge is the exit ramp for the pack's "Highway" routing system. Where Highway Detour splits a signal into Route 1 and Route 2, this node takes those two lanes and merges them back into one wire so the rest of your graph doesn't care that a detour happened. If you've never touched the Highway nodes, this one on its own looks pointless - an any-type input in, an any-type output out. It only earns its keep as half of a Detour → Merge pair.

The idea is the same A/B-routing pattern every logic pack ships, dressed up with labels. You point Route_1 and Route_2 at the two branches of a split, the hidden merge_state (0 or 1) decides which lane is live, and passthrough carries that single winner downstream. The interesting part is frontend sync: the JS extension pairs the Merge with its Detour visually, so when you flip the Detour's route the Merge highlights the matching incoming path. You get the read-your-graph benefit of a real switch without a tangle of selector wires.

What to set

  • Route_1 / Route_2 - the two branches. They're * typed, so anything goes: images, latents, conditioning, even a model. Keep them the same type, because the node won't convert for you.
  • label_1 / label_2 - purely cosmetic, defaults "MERGE RT 1" / "MERGE RT 2". Rename them to match what each branch actually is ("with ControlNet", "without"), because the whole point of the Highway system is that you can tell what's routing where at a glance.
  • merge_state - 0 picks Route_1, 1 picks Route_2. It's a hidden widget, so in practice you flip it from the paired Detour or drive it from a Breaker/panel switch rather than typing in it.

Where this pattern shines is A/B testing: a Detour upstream, two prompt or post-processing chains, a Merge downstream, and you can hot-swap the active lane mid-workflow. It's the "keep two chains in one workflow and flip between them" use case the KB's node-plumbing doc describes - just with prettier labels than a bare switch.

Install

Same as the rest of the pack:

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

then restart ComfyUI. Or open ComfyUI Manager and search "Shima". No models to download for this node, but expect the pack's first boot to auto-install its two real dependencies - ComfyUI-Impact-Pack and cg-use-everywhere - plus a couple of pip packages. That's the pack being opinionated, not this node.

Gotchas

The classic beginner trip-up is treating Highway Merge like an ordinary passthrough and never wiring the Detour side - then merge_state does nothing visible and you wonder which route is live. Also, if either input arrives None, the node silently falls back to the other one rather than erroring, which is convenient for optional branches but means a silently dead lane can go unnoticed. The Highway nodes lean on the legacy canvas, so if the Detour/Merge sync highlighting looks broken under the Nodes 2.0 frontend, drop back to the classic renderer. And honestly - for a one-off switch you don't need Shima for this at all; plain A/B switch nodes in other packs do the same job. Reach for Highway when you're already living inside the island system and want the visual sync, not as a reason to install the pack.

CategoryShima/Utilities

Inputs (5)

NameTypeDefaultDescription
merge_stateINT00–1
label_1STRINGMERGE RT 1
label_2STRINGMERGE RT 2
Route_1opt*
Route_2opt*

Outputs (1)

NameTypeDescription
passthrough*