Regions Preview
Can't tell a bad mask from a moving subject? This node can
- latent
- maps
- report
- drift
If you're using Nynxz's regional-LoRA stack on Krea 2, there are three ways a run can go wrong, and they all produce the same sad picture: character A's LoRA is faintly smeared onto character B, or onto the background. Either your mask caught the wrong thing, or the mask was right and the subject moved somewhere the tracking couldn't follow, or the LoRA is bleeding for reasons that have nothing to do with the map. The whole point of Regions Preview is that these stop looking identical.
This pack gates LoRAs by region without ever merging them - an unusual trick. Where classic regional prompting masks the conditioning, this one runs each LoRA as a live side branch and lets the model decide, per canvas token, which LoRA's delta fires where. Regions Apply patches the Krea 2 DiT and reads the routing map out of its per-block attention hooks during sampling. That's powerful, and it's also a black box. Regions Preview is the lid you take off it afterwards.
What you wire
The node is deliberately dumb and deliberately smart at once. It takes exactly two inputs, and the important one isn't read:
latent- the sampler'sLATENToutput. Not read, ever. It only exists to force this node to run after sampling, because the gate map is computed inside the DiT mid-run and doesn't exist before it.cell- pixels per canvas token in the render (default 12, 1–96). The map is one cell per token, so this is purely how big you want the picture; it adds no detail.
So your graph is Regions from Masks → Region LoRAs → Regions Apply → KSampler, with the sampler's LATENT also wired into Regions Preview. Its sibling Region Inspect shows the before picture (the masks you built); Preview shows the after - what actually gated the sampling.
Reading the output
The maps output is an IMAGE batch: first the map that ran as an overlay, then the mask it started from, then one mask-vs-map panel per region. The author's legend for the panels is simple:
- magenta - mask and map agree. That's the region.
- blue - mask only: territory the tracker gave up. Fine if the subject moved off it.
- red - map only: territory the tracker took. Fine for the same reason, wrong if it's nowhere near the character.
An all-magenta panel means tracking changed nothing - which is track off, a mask that was already right, or a commit so early nothing had emerged to track.
drift (FLOAT, 0–1) puts a number on the same thing: the mean movement between the starting mask and the map that ran. Near zero with tracking on usually means the map froze before layout existed; big drift with a clean core is the tracker earning its keep; big drift with the region somewhere else entirely means the clustering latched onto the wrong blob, and the fix is a better mask, not a bigger knob.
The report string is worth routing to a text node. It lists coverage per region (mask % → map % of canvas, and what share of cells each region wins), what the schedule did, the drift, and then actually useful notes: "ALMOST NOTHING IS CLAIMED" (wrong fit or empty masks upstream - every LoRA is doing nothing), "NOTHING IS BACKGROUND" (masks grew too much; each LoRA fires across the whole canvas, which is close to merging them), and "the tracker moved nothing".
Install
The pack has no Python dependencies and installs like any custom node:
cd ComfyUI/custom_nodes
git clone https://github.com/Nynxz/ComfyUI-NynxzNodes
then restart ComfyUI - or just search "NynxzNodes" in ComfyUI Manager. The catch is that the whole pack is written against ComfyUI's newer comfy_api node API, so if the nodes don't show up, update ComfyUI before you debug anything else. And remember the ground rule from the README: the Regions stack is Krea 2 only and experimental - Regions Apply refuses to run on any other architecture, so Preview has nothing to show until a patched Krea 2 model has actually sampled.
When it bites you
If Preview errors with "No region map has been recorded", the patches never fired - check that the sampler's model is the one Regions Apply returned, and that Preview runs after that sampler (that's the latent wire's whole job). And when the output looks subtly off, read the panels before touching track: this node is how you learn whether the mask, the subject's movement, or the LoRA itself is the problem - which is three different fixes.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | The sampler's output. Not read — it only forces this node to run after sampling, which is when the map exists. | |
| cell | INT | 121–96 | Pixels per canvas token in the render. The map is one cell per token, so this is only how big you want to look at it. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| maps | IMAGE | Batch: the map overlay, the mask overlay, then one mask-vs-map panel per region. |
| report | STRING | Coverage per region, what the schedule did, and the drift. |
| drift | FLOAT | Mean movement between the mask and the map that ran, 0..1. |