Nodes/comfyui-fvmtools/K2 Regional LoRA
ComfyUI Node

K2 Regional LoRA

The node that finally keeps two character LoRAs from bleeding together

By ping1979ping·Created 6 months ago·Updated about a month ago· 0
K2 Regional LoRA
  • loras
  • loras
lora_name
strength1.00
global_scopefalse
regions
routingstandard
trigger_phrase
display_name

K2 Regional LoRA is where the K2 Lab suite in comfyui-FVMtools actually earns its keep. You can fake regional prompting with clever prompt phrasing on Krea 2 - bounding boxes work partially zero-shot because Qwen3-VL was trained on boxes - but you cannot fake two different character LoRAs staying in their own halves of the frame. That's the multi-character problem that's been the most friction-filled operation in the hobby: two character LoRAs active at once, and the model blends them into one averaged person. This node attacks the leak at the attention level.

How it works

A regional LoRA is applied unfused. The delta is computed in the forward pass and gated per token, so it only touches the text tokens of the assigned clause and the image tokens inside the assigned boxes. Base weights are never rewritten - which is also why this works on FP8/INT8 checkpoints, where you can't overwrite weights anyway. Compare that with a global LoRA (global_scope on), which is applied as a normal fused patch: fast, affects everything, no routing.

A detail worth knowing: strict regional routing skips the wk/wv targets of the main stream, because those key/value projections are read by every image query and a regional delta there couldn't stay location-bound. The plan report counts these under locality_skipped_targets (typically 56 of 256). That's not a bug - it's the mechanism working.

The inputs that matter

  • lora_name - a Krea 2 LoRA. Non-Krea architectures get rejected at compose time rather than silently doing nothing, which is friendlier than it sounds.
  • strength - the delta multiplier. 0 disables the assignment; negative inverts the learned delta.
  • global_scope - off for strict regional routing (the default), on for a fused whole-image patch.
  • regions - comma-separated region names (or ids) that receive this LoRA. A typo is rejected with a list of valid names instead of silently doing nothing.
  • routing - standard, or character_identity for face/person LoRAs, which injects an explicit identity anchor sentence built from the trigger phrase (e.g. "<trigger> identifies the person in this region…"). For character work, use it.
  • trigger_phrase - the activation phrase learned at training time. Required for character_identity.

Chain multiple LoRA nodes through the loras input - one per character, each pointing at its own regions - and that whole chain goes into K2 Compose's loras slot. Same LoRA twice at different strengths for two different characters is explicitly fine.

The honest limitation

The LoRA delta stops at the box edge, but the trajectory doesn't: image-to-image attention stays deliberately porous (otherwise you'd get tile seams), so a regional LoRA still nudges the image outside its box a little. If you need hard locality, K2 Latent Pin exists for exactly that - sample the same seed with and without the LoRAs and pin the outside to the clean run.

Install

Same as the whole pack:

cd ComfyUI/custom_nodes
git clone https://github.com/ping1979ping/comfyui-FVMtools

Restart ComfyUI, find it under FVM Tools/K2. No extra Python dependencies. And remember the one hard rule from Compose: don't disable spatial routing while a regional LoRA is active, or its text delta becomes shared scene conditioning that leaks everywhere. If a LoRA seems to do nothing at all, run K2 LoRA Info on the file first - it might not be a Krea 2 LoRA to begin with.

CategoryFVM Tools/K2

Inputs (8)

NameTypeDefaultDescription
lora_nameCOMBOKrea 2 LoRA. Non-Krea architectures are rejected at compose time instead of silently doing nothing.
strengthFLOAT1.00-4–4Delta multiplier. 0 disables the assignment, negative inverts the learned delta.
global_scopeBOOLEANfalseOn: applies to the whole image (fused, fast). Off: strict regional routing using the regions below.
regionsSTRINGComma separated region names (or ids) that receive this LoRA. Only used when global_scope is off.
routingCOMBOstandardstandard: gate text-fusion and local main-stream deltas to the assigned boxes. character_identity: same isolation plus an explicit identity anchor built from the trigger phrase.
trigger_phraseSTRINGActivation phrase learned during LoRA training. Required for character_identity.
lorasoptK2_LORAChain input: previously assigned LoRAs.
display_nameoptSTRINGOptional label used in reports.

Outputs (1)

NameTypeDescription
lorasK2_LORA