Nodes/Shima/Shima Route (4)
ComfyUI Node

Shima Route (4)

The Shima Route (4)

By KDB-USJP·Created 6 months ago·Updated 6 months ago· 2
Shima Route (4)
  • in_1
  • in_2
  • in_3
  • in_4
  • out_1
  • out_2
  • out_3
  • out_4

The Shima Route (4) takes the pack's routing idea to four slots: four wildcard inputs, four pass-through outputs, and the same configurable port sides. By the time you're moving four signals together you're not just tidying wires - you're building a de-facto bus, and a single node with labeled, type-colored outputs is a much saner thing to aim at than four individual reroutes.

That's the real argument for this node. ComfyUI's core reroute and rgthree's version handle one wire beautifully, but when a bundle of four signals needs to travel as a group, dragging four separate reroute nodes and keeping them aligned is busywork. Route (4) gives you one node where the group stays together, the order stays obvious, and the outputs color-code themselves to whatever type each input actually is.

How it works

Same plumbing as the rest of the suite: ANY wildcard inputs, VALIDATE_INPUTS returning true, inputs returned 1:1 in order. It returns float("NaN") from IS_CHANGED, so it executes every run - a wire segment that always runs, which is correct for a pass-through but does defeat the execution cache for anything upstream (the KB's plumbing essay flags this "always dirty" pattern as the thing to watch when a big workflow feels slow). Each input is optional; unwired slots pass through as None. Right-click the node to move the ports to any side.

The inputs and outputs

  • in_1in_4 (optional, any type).
  • out_1out_4 - the same signals, same order.

The four can be mixed types without complaint - an IMAGE, a LATENT, an INT seed, and a STRING all riding one node is perfectly legal.

Where it fits

A sampler's input quartet - model, latent, positive, negative - is the canonical use. Or a comparison quartet: two images and their two masks. At an island boundary, Route (4) makes a tidy, legible landing point for the four most common generation signals when you're composing with Use Everywhere broadcasts. For groups of five, the Route (5) exists; for more than that, the pack's Multi-Pipe nodes (up to 15 typed connections) are the heavier hammer.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/KDB-USJP/shima_wf.git Shima
pip install -r requirements.txt

Restart, then Shima/Routing → Shima Route (4). ComfyUI Manager: search "Shima". First boot auto-installs ComfyUI-Impact-Pack and cg-use-everywhere if missing (the Use Everywhere dependency for island auto-linking) - expected.

Common issues

The main hazard is slot discipline: with four unconnected sockets, it's easy to misremember which slot holds what, and the node will faithfully pass the swap through. Label by connecting consistently - wire the heaviest signal (image or latent) to in_1 and work down, so the ordering is memorable. And remember this node never gates or selects - if you need to choose between four inputs rather than pass them all, you want a switch node, not a route.

CategoryShima/Routing

Inputs (4)

NameTypeDefaultDescription
in_1opt*Input 1
in_2opt*Input 2
in_3opt*Input 3
in_4opt*Input 4

Outputs (4)

NameTypeDescription
out_1*Output 1
out_2*Output 2
out_3*Output 3
out_4*Output 4