arkennemasis Gen Route (deterministic or generative)
Two paths to an image — one of them costs nothing
- deterministic
- generative
- image
- route_taken
- report
ArkGenRoute is the fork in the arkennemasis Variation pipeline that decides, per cell, whether the image gets made by an image model or by math. It routes each cell to either the deterministic path - mask plus a colour transform in CIELAB - or the generative path - the image model. The whole point is that both inputs are lazy, so the branch not taken is never evaluated. Route a cell to the deterministic colour transform and no API call happens at all, no model loads, nothing spends.
That lazy-input design is the same engine trick the pack uses in its Shot Selector: ComfyUI only evaluates what the downstream node actually asks for. So the cost saving isn't "the cheaper path runs," it's "the expensive path literally never executes."
Which route wins, and how it decides
The route dropdown has three options: generative, deterministic, or auto. On auto (the default), the node reads the axis's route field from the recipe, and if the recipe says nothing, it defaults to generative. There was a time when "this cell is a hex colour" implied deterministic; that's gone. The source is explicit about why: taking the deterministic route silently requires masks that exist for exactly one hand-prepared product, and the failure mode when they're missing is an image that ships back unchanged - which is worse than a bad generative image, because it looks like success. So deterministic only happens when the recipe explicitly opts in. If you want the free path, you author masks, and you declare route: deterministic on the axis.
Both deterministic and generative are optional IMAGE inputs - wire Region Recolour into the first, the image-model branch into the second. The node also takes optional cell_json and recipe_json to resolve the auto decision and to know which axis it's routing.
Outputs
image- the routed result, straight through.route_taken-deterministicorgenerative, for logging and for the run report.report- a few lines stating the route, why it took it, and the cost:none - no model callon the deterministic side,one generation callon the generative side. That cost line is the feature; it makes every decision auditable.
There's a genuinely useful failure mode built in: if the route resolves to a branch that isn't wired, it returns an ExecutionBlocker rather than failing cryptically - the message names the missing input, and everything downstream is skipped instead of running on nothing.
Installing
Part of the comfyui-arkennemasis pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Hishamahmer/comfyui-arkennemasis
pip install replicate httpx
then restart. It's under arkennemasis/Variation, and it needs no model or key of its own - those live on the branches it routes between.
The honest takeaway: this node is only as good as your masks. If you haven't hand-authored region masks and opted the axis into the deterministic route, you're on the generative path for everything, and GenRoute is just an extra hop in the graph. Build the masks for the axis you generate the most (usually the one with the most values), declare the route, and watch those cells stop billing. Everything else can stay generative without you having to rebuild the chain.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| route | COMBO | Auto reads the axis's 'route' field from the recipe, falling back to: hex spec -> deterministic, anything else -> generative. | |
| deterministicopt | IMAGE | Wire Region Recolour here. | |
| generativeopt | IMAGE | Wire the image-model branch here. | |
| cell_jsonopt | STRING | — | |
| recipe_jsonopt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| route_taken | STRING | — |
| report | STRING | — |