Nodes/arkennemasis Nodes/arkennemasis Gen Route (deterministic or generative)
ComfyUI Node

arkennemasis Gen Route (deterministic or generative)

Two paths to an image — one of them costs nothing

By Hishamahmer·Created 2 months ago·Updated 8 days ago· 9
arkennemasis Gen Route (deterministic or generative)
  • deterministic
  • generative
  • image
  • route_taken
  • report
route
cell_json
recipe_json

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 - deterministic or generative, for logging and for the run report.
  • report - a few lines stating the route, why it took it, and the cost: none - no model call on the deterministic side, one generation call on 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.

Categoryarkennemasis/Variation

Inputs (5)

NameTypeDefaultDescription
routeCOMBOAuto reads the axis's 'route' field from the recipe, falling back to: hex spec -> deterministic, anything else -> generative.
deterministicoptIMAGEWire Region Recolour here.
generativeoptIMAGEWire the image-model branch here.
cell_jsonoptSTRING
recipe_jsonoptSTRING

Outputs (3)

NameTypeDescription
imageIMAGE
route_takenSTRING
reportSTRING