arkennemasis Region Mask (one region from the locked plate)
Pull one region's mask out of the plate without naming it
- mask
- region
- found
The arkennemasis pipeline freezes one base photograph into a "plate" at the start of a run, and that plate carries a mask for every named region of the product - the top panel, the handle, the cable. ArkRegionMask is the node that fetches one of those masks back out. The clever bit: give it a cell and it resolves the cell's own target region by itself, so a per-cell chain needs no per-region wiring no matter how many regions the product has.
That's the difference between a workflow you can build once and a workflow you hand-repair for every product. The cell knows which axis is its leading one - the axis painting the largest area - and that axis knows its region, and the region knows its mask. This node just walks that chain for you.
How it works
Give it plate_lock_json plus either a cell_json (it resolves the region from the cell's leading axis) or a region string (a manual override). It reads the region's mask file from the plate lock, loads it, and hands back a MASK tensor. invert returns everything except the region - useful when you want the pipeline to treat one region as sacred. If the plate has no mask for that region, on_missing decides: empty mask lets the run continue with a whole-frame colour reading (weaker but not wrong), while fail stops so you notice the masks were never authored.
Inputs and outputs
plate_lock_json- from Plate Lock. The only required input.cell_json- the cell whose target region to fetch. Its leading axis decides.region- overrides the cell's region.invert- return everything except this region.on_missing-empty mask(default) orfail.mask- the MASK output, wired into whatever needs a mask (Region Recolour, inpainting, the verify stage).region- the resolved region name, so downstream knows what it got.found- true when a real mask existed; false on the empty-mask fallback. Wire it if you want the run to behave differently when a region is missing.
Install and gotchas
Ships in the arkennemasis pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Hishamahmer/comfyui-arkennemasis
pip install -r ComfyUI/custom_nodes/comfyui-arkennemasis/requirements.txt
Restart, or install via ComfyUI Manager by repo URL.
The failure to watch for is the invented-name problem, and it's upstream: if the Recipe Brief ran without the plate lock wired, the model proposed region names that don't match the masks the plate actually has. This node then can't find the mask, and with on_missing on the default empty mask you get a run that silently paints nothing. If you ever see found going false across a whole batch, that's the signal - either wire the plate lock into the brief or set on_missing to fail and fix the recipe at the gate instead of after the run.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| plate_lock_json | STRING | {} | From Plate Lock. |
| cell_jsonopt | STRING | The cell whose target region to fetch. Its leading axis — the one painting the largest area — decides. | |
| regionopt | STRING | Overrides the cell's region. | |
| invertopt | BOOLEAN | false | Return everything EXCEPT this region. |
| on_missingopt | COMBO | What to do when the plate has no mask for that region. 'empty mask' lets a run continue with a whole-frame colour reading, which is weaker but not wrong; 'fail' stops so you notice the masks were never authored. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| mask | MASK | — |
| region | STRING | — |
| found | BOOLEAN | — |