ComfyUI Node

Region LoRA

Bind one LoRA to one region, so it fires only where that region owns the canvas

By Nynxz·Created 10 months ago·Updated a day ago· 0
Region LoRA
  • regions
  • regions
region1
lora_name
strength1.00

The whole trick behind ComfyUI-NynxzNodes' Regions system is that a LoRA is kept unmerged and run as a live side branch with a per-token gate: the LoRA fires on tokens its region owns, and stays off everywhere else. Region LoRA is the node that makes the binding - it attaches one LoRA to one region, by region number.

Use it when you want a clean, explicit, chainable graph: Regions from Masks makes the regions, then a Region LoRA node per character, each binding a different LoRA to a different region number. If you've got more than a couple of bindings this gets verbose, which is exactly why the pack also ships Region LoRAs - a table version that does the whole assignment in one node. Start with the table for a stack of characters; reach for Region LoRA when the LoRA name comes from a wire (a dynamic workflow), because it's the single-binding, chain-friendly form.

What you set

  • regions - the region set, from Regions from Masks or any upstream binding node.
  • region - which region to bind to, numbered as the reports list them (1 = first, and the order is the mask batch's order). Get this wrong and you're gating the wrong LoRA to the wrong subject - the pack's "numbered, not named" convention bites here if you ignore it.
  • lora_name - the LoRA picker. Here's the compatibility catch, straight from the tooltip: it must be a plain LoRA. LoHa, LoKr and DoRA can't be run as an unmerged side branch, and their layers are skipped with a warning rather than crashing. If your favorite character is a LoKr and the effect is mysteriously absent, that's why.
  • strength (default 1, range -4 to 4) - the peak strength, reached where the region fully owns a token. It's the same number a normal LoRA loader takes; it just lands on this region instead of the whole image.

Output is the regions set again, now carrying the binding, ready for the next Region LoRA in the chain or straight into Regions Apply (which patches the model and does the actual per-token gating during sampling).

Why the unmerged trick matters

Merge two character LoRAs into the weights and both deltas fire on every token - that's the identity blending everyone hits the moment two characters share a frame, and no prompting escapes it because the deltas are baked into the model. Running each LoRA as a live branch with a mask-derived gate keeps the deltas apart: A's tokens only ever see A's branch. The conditioning is never touched, which is the other neat property - it composes with an ordinary LoraLoader for a global style on top of the regional characters.

Install & caveats

Part of Nynxz's Custom Nodes: ComfyUI Manager → search "NynxzNodes" (registry build preferred; hand clones need pnpm install && pnpm build - the UI's web/ is gitignored), or git clone https://github.com/Nynxz/ComfyUI-NynxzNodes. No pip dependencies. The whole Regions group is Krea 2 only and experimental - the routing map is read out of that model's per-block attention hooks, and Apply fails loudly on anything else rather than silently doing nothing. Don't buy a new LoRA because this looked weak on a non-Krea model; the error will tell you.

CategoryNynxz/Regions

Inputs (4)

NameTypeDefaultDescription
regionsNYNXZ_REGIONSFrom Regions from Masks, or another binding node.
regionINT11–64Which region, numbered as the source node's report lists them (1 = first). Order is the mask batch's order.
lora_nameCOMBOMust be a plain LoRA. LoHa/LoKr/DoRA cannot be run as an unmerged side branch and their layers are skipped with a warning.
strengthFLOAT1.00-4–4Peak strength, reached where this region fully owns a token. The same number a normal LoRA loader takes — it just lands on this region instead of the whole image.

Outputs (1)

NameTypeDescription
regionsNYNXZ_REGIONS