Pepe Route Split
Block every route except one — including the Save nodes
- input
- choice_0
- choice_1
- choice_2
- choice_3
- choice_4
- choice_5
- choice_6
- choice_7
Pepe Lazy Route is great at picking one of eight branches when they all reconverge into a single consumer. But it has a blind spot that will bite you the first time you hit it: ComfyUI schedules every output node - Save Image, Preview Image, and friends - as its own terminal path. So if a branch you didn't choose ends in its own Save node, that save fires anyway, because a lazy router upstream has no say over a terminal it doesn't feed. Pepe Route Split is the complementary tool: it passes its input through the selected output and silently blocks every other route, so branches that end independently - each with its own Save, its own Preview - behave correctly.
How it works
It's the mirror image of the Lazy Route, and it's built on the same execution-blocker mechanic as Pepe Break. You feed it one shared value (input, a wildcard * socket) and a choice_index (0–7, meant to come from Pepe Image Filter). The node returns all eight outputs at once, but only the selected one carries your value; the other seven get ComfyUI's silent execution blocker, so nothing downstream of them runs and nothing errors.
input- the value (image, latent, or whatever) shared by all routes.choice_index- which route lives.- Outputs:
choice_0throughchoice_7, one of which gets the input.
The README states the design rationale plainly: "A lazy merge alone cannot suppress a Save/Preview node elsewhere in the graph because ComfyUI schedules every output node as a separate terminal path." That's the whole reason this node exists in the pack alongside the Lazy Route - the two cover the two graph shapes.
When to use it vs. Pepe Lazy Route
Think about how your routes end.
- Routes reconverge - all branches feed the same downstream consumer, and you just want the winner's value. That's Pepe Lazy Route.
- Routes diverge to their own output nodes - each branch has its own Save Image or Preview Image, and you want the losers to stay silent. That's Pepe Route Split. Connect the shared image (or whatever) to
input, wirechoice_indexfrom the Image Filter, and start each branch from the matchingchoice_0–choice_7output.
The classic use is a workflow where the interactive pick decides between saving a full-res upscale, a preview downscale, or an untouched original - three Save paths, only one should ever write a file.
Installing it
Same pack as the rest:
cd ComfyUI/custom_nodes
git clone https://github.com/Pepehoschi/ComfyUI-PepeUtils.git
or ComfyUI Manager → ComfyUI-PepeUtils, restart. No extra dependencies.
Gotchas
All eight output sockets exist on the node whether you use them or not - the blocked ones just never deliver data. choice_index is validated to 0–7 and you'll get a clear error outside that range. And note the asymmetry with lazy routing: this node blocks by sending blockers downstream, so it doesn't itself prevent the upstream of unselected branches from being evaluated - if you have an expensive branch that must not compute at all, put a lazy route or a Pepe Break upstream of the expensive part too. Used together, the three flow nodes cover most "let the workflow decide" cases cleanly.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| input | * | — | |
| choice_index | INT | 00–7 | Zero-based choice index from Pepe Image Filter |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| choice_0 | * | — |
| choice_1 | * | — |
| choice_2 | * | — |
| choice_3 | * | — |
| choice_4 | * | — |
| choice_5 | * | — |
| choice_6 | * | — |
| choice_7 | * | — |