Nodes/ComfyUI Layer Style/LayerUtility: Any Rerouter
ComfyUI Node Runs on cloud

LayerUtility: Any Rerouter

AnyRerouter — a reroute that actually keeps the wildcard type

By chflame163·Created 3 years ago·Updated 4 days ago· 3,113
LayerUtility: Any Rerouter
  • any
  • any

A reroute node is just a dot you drag your noodles through to keep a graph readable. Most of the time the built-in one is fine. Where it isn't is when you're routing an any-typed value - the wildcard connections that some nodes use - and the reroute either won't accept the link or forgets what type it was carrying. AnyRerouter is the fix: a reroute that takes anything and passes it straight through with the type intact.

How it works

There's genuinely not much to it, and that's the point. One input, one output, both typed as the universal wildcard. Whatever goes in comes out, unchanged, so you can bend a connection around your canvas without ComfyUI complaining that the types don't line up. It exists because the generic wildcard (*) type doesn't always survive a normal reroute cleanly, and passing it through a node that explicitly declares wildcard-in, wildcard-out sidesteps that.

The inputs and output that matter

  • any (input) - accepts any type at all.
  • any (output) - the same value, same type, back out.

That's the whole node. You wire the source into the input and the output onward to wherever the value was going. No settings, no toggles.

Where it earns its place is exactly the connections other reroutes fumble. The any-typed outputs - a switch or logic node that can return an image or a latent or a model, the passthrough on PurgeVRAM V2, the baton on QueueStop - are the ones where a normal reroute either refuses the link or drops the type so the downstream node can't tell what it's receiving. Because AnyRerouter declares wildcard-in and wildcard-out explicitly, the value flows through with its identity intact, and you can bend that noodle around a crowded canvas without ComfyUI throwing a type mismatch.

How to install it

ComfyUI Manager: search ComfyUI Layer Style, install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/chflame163/ComfyUI_LayerStyle

install requirements.txt into ComfyUI's Python, restart. You'll find it under 😺dzNodes → LayerUtility → Data.

Common issues and the honest take

Nothing to troubleshoot - there's no model, no state, no failure mode beyond a mis-wired link.

The honest framing is that this is a tidiness tool, not a functional one: it doesn't transform your data, it just lets you route it neatly. If you're not already running Layer Style, installing a big compositing pack for one reroute is overkill - the rgthree "Reroute" and the various wildcard reroutes in other utility packs cover the same ground. But if Layer Style is already in your custom_nodes for its mask and compositing work, this is a perfectly good wildcard reroute that's right there in the menu, and it beats fighting the stock one over an any-typed connection.

Category😺dzNodes/LayerUtility/Data

Inputs (1)

NameTypeDefaultDescription
any*—

Outputs (1)

NameTypeDescription
any*—