NEW in V12 — Unified Spatial: boxes control placement, scene & outfit transfer, face/body detailer
V12 is a new node (Krea2 Regional Multi-LoRA V12) that keeps everything v1/v3 guaranteed — hard LoRA-to-box masking — and adds the three things people kept asking for:
Boxes now control WHERE and HOW LARGE each subject renders, not just where its LoRA may act.
Scene transfer and outfit transfer — drop your LoRA characters into any real photo, or dress them from a second photo, using only the standard identity edit LoRA. No per-character reference photos, no portrait pre-renders.
An optional Regional Detailer node that re-renders each subject's body and face at high resolution with its own LoRA for maximum likeness.
The V12 example workflow is at example_workflows/krea2_regional_multilora_v12.json. Full version history is in CHANGELOG.md.
What V12 actually does (technical)
One caption, exact token spans. Your box-builder prompt is recompiled into a single scene-wide caption. For each box, V12 resolves the exact Qwen token span of that region's subject clause — including the offset math needed to find the caption inside Krea 2's grounded encoding, where hundreds of vision tokens precede your text. Everything downstream operates on real token positions, not approximations.
Problem this solves: Regional systems can attach the wrong words to the wrong box when token positions are estimated, especially with long prompts or image references.
What this unlocks: Reliable prompt-to-box matching for complex scenes and any number of characters, without requiring users to count tokens or simplify their captions.
Hard cross-modal ownership (fused block-sparse attention). A FlexAttention block mask partitions attention so each region's text span has exclusive ownership of a field inside its box: subject A's tokens structurally cannot influence subject B's pixels, and B's pixels cannot read A's text. This is a hard block, not a bias nudge — the same philosophy as v1's activation masking, applied to attention routing. It is the main cure for identity bleeding between adjacent boxes.
Problem this solves: When multiple people are close together, one character's description or identity can leak into another character, producing blended faces, swapped traits, or duplicate subjects.
What this unlocks: Multiple distinct LoRA characters can stand beside, touch, or interact with each other while retaining separate identities.
Attraction field. Blocking only prevents leakage — nothing pulls a subject into its box, so the model would still place people at its preferred composition. V12 adds a pre-softmax logit boost that binds each regional span to its full box, so subjects materialize inside their boxes.
Problem this solves: Ordinary LoRA masking limits where an identity can act, but does not force the model to generate the person inside that area.
What this unlocks: Boxes become real placement controls: move a box and the associated subject follows it instead of appearing wherever the model prefers.
Box-authoritative framing. The caption's camera sentence is derived from the largest active box height, and close-up wording that contradicts small boxes (e.g. "selfie" with knee-high boxes) is rewritten automatically. The result: a tall box gives you a large foreground subject, a small box gives you a distant full-body subject. Box size is the framing contract.
Problem this solves: Prompt phrases such as "selfie" or "close-up" can fight small boxes, causing oversized people, unwanted close-ups, or extra duplicate figures.
What this unlocks: You control both position and apparent subject size visually: large boxes create foreground subjects, while small boxes create distant or full-body subjects.
Masks that forgive, but never bleed. LoRA delta masks extend past the box edge in a soft "skirt" (35% of box size) so a subject that slightly overflows keeps full identity — but each skirt is Voronoi-limited to halfway across the gap toward any neighboring box, so skirts can never cause cross-identity bleed. Feathering is capped per box (30% of the box's smaller side), so even tiny boxes keep a full-strength LoRA core. Where masks overlap, the stronger region wins outright instead of identities summing.
Problem this solves: A face that lands partly outside its box can lose likeness, while simply enlarging the LoRA mask risks contaminating the neighboring character. Tiny boxes can also weaken a LoRA until it is barely recognizable.
What this unlocks: Strong likeness survives small placement errors and distant subjects without allowing adjacent character LoRAs to mix.
Scene transfer — only the edit LoRA required
Wire any photo into extra_ref_1. The image is generated from noise with your photo as a krea2edit reference frame — so lighting, perspective, shadows and reflections integrate naturally. This is not latent pasting; your characters can lean on the furniture.
edit_lora: the standard Krea 2 identity edit LoRA. That is the only extra model needed.Character likeness comes entirely from your per-region character LoRAs, exactly as before.
refs_jsonrow 1 stays{"role":"scene"}(the default).
Problem this solves: Traditional inpainting often makes characters look pasted into a photo because lighting, perspective, shadows, and contact with the environment are resolved separately.
What this unlocks: Place your LoRA characters naturally inside almost any scene photo using one standard edit LoRA—without training scene LoRAs or supplying a separate portrait reference for every character.
Outfit / object transfer
Wire a second photo into extra_ref_2 with a full-canvas box (0,0,1,1) and describe its role in refs_json:
[{"role":"scene"},
{"role":"object","note":"outfit, worn by the woman"}]The plate becomes its own reference frame and the node writes the referring text ("the outfit from the third reference") with the correct frame number automatically. Roles: auto | scene | person | object | style. The note is "noun, where it goes".
Problem this solves: A text prompt alone cannot faithfully reproduce a particular outfit, prop, product, or visual design from another image, and reference numbering becomes error-prone as more plates are added.
What this unlocks: Borrow a specific outfit or object from a second image and direct it to the intended character while preserving that character's LoRA identity and the first image's scene.
Regional Detailer (optional but recommended)
Krea2 Regional Detailer sits between VAEDecode and SaveImage (already wired in the example workflow):
Body pass: crops each subject's box with context, upscales it, and re-renders it img2img with that region's own LoRA.
Face pass: detects the actual faces in the final image (YOLOv8
face_yolov8m.ptif you have it, OpenCV Haar fallback), assigns each face to its region one-to-one by proximity, and re-renders each face at high resolution with the correct LoRA — wherever the face actually rendered. Even a subject that drifted across its box seam gets its identity restored in place.Feathered paste-back, pixel budget capped,
skip_above_pxlets you refine only small/distant subjects.
Cost: roughly 40–60 s for two subjects (8 steps each pass) on top of the main generation.
Problem this solves: Small or distant faces may not contain enough pixels for strong likeness, and subjects can drift across box boundaries during the initial generation.
What this unlocks: High-detail, LoRA-accurate faces for two, three, or more characters—even when their final rendered positions do not perfectly match the original boxes.
How to use the V12 workflow, step by step
Load example_workflows/krea2_regional_multilora_v12.json. Every input on the nodes has a hover tooltip explaining what it does — hover anything you're unsure about.
Models:
krea2_turbo_bf16.safetensors(UNET),qwen3vl_4b_bf16.safetensors(CLIP, typekrea2),qwen_image_vae.safetensors(VAE), and the Krea 2 identity edit LoRA in the V12 node'sedit_loraslot.Scene photo: load your scene into the
LoadImagewired toextra_ref_1. (To generate without a scene, disconnect it and setuse_krea2editoff.)Prompt: in the box builder, describe the overall scene and what the people are doing — "man and woman standing in a modern kitchen, posing for a photo together, the man has his arm around the woman". Keep
background is from reference photo 1when using a scene photo. Interactions between subjects (arm around, holding hands) belong here.Boxes: draw one box per character, sized like the person should appear — tall box = close/large subject, small box = distant subject. Give each box a short generic description ("man", "woman"). Don't overlap boxes; leave a small gap.
Regions: in the V12 node, each row pairs with its box in order. Pick each row's character LoRA and strength (start at 1.3–1.4, with
base_strength1.1). Row prompts stay short and generic ("a man"); the identity comes from the LoRA, not the words.Outfit transfer (optional): load the outfit photo into the
LoadImagewired toextra_ref_2and keep therefs_jsonobject role. Remove/disconnect it if unused.Sampler:
euler/simple, 8–12 steps, CFG 1.0 (already set).Detailer: leave
enableon for the extra face/body pass, or turn it off to A/B its effect. If furniture inside the boxes gets re-textured, lowerbody_denoiseto ~0.20 — the face pass carries the identity work.Queue. First V12 run compiles the fused attention kernel (~1 min one-time overhead per session); subsequent runs are fast.
V12 knobs worth knowing
KnobDefaultWhat it doesbase_strength1.1Global multiplier on all region strengths.grounding_px1024Vision-grounding resolution for the scene photo.edit_lora_strength0.68Edit LoRA weight. Raise region strengths → lower this.ref_max_side0 (native)Main speed knob: downscales reference frames before encoding. Raise likeness by keeping 0; gain speed by setting ~1024.blend_override0Leave at 0 — anything higher blends LoRAs canvas-wide.Detailer body_denoise / face_denoise0.30 / 0.400 disables that pass.Detailer lora_scale0.70Region strength × this for refinement passes (full-model patch runs hotter than delta injection).
V12 requirements
Recent PyTorch with FlexAttention (
torch >= 2.5; tested on 2.11) and a workingtorch.compile(Triton). If you already run sage attention, you have this.Optional, for best face detection in the Detailer:
pip install ultralyticsandface_yolov8m.ptinComfyUI/models/ultralytics/bbox/(the standard ADetailer face model). Without it, an OpenCV fallback is used.Everything else is inherited from the base package (torch, safetensors — no other custom-node dependencies).
NEW in v3 — Reference Lock: per-region reference images
Why v3 exists
v1 solved spatial bleeding: two LoRAs in the same generation influencing each other's tokens. The masking guarantees LoRA A stays in box A. But that left a second, different problem on the table: identity drift. A LoRA gives you the distribution of a character, not a fixed likeness — run 20 seeds and the face wanders; generate a series of shots and shot 12 doesn't quite match shot 1. Perfect spatial isolation in every frame, and still no anchor holding the identity constant across generations.
Those are orthogonal problems, and the community discussion around v1 made that sharp: bounding boxes prevent bleed within an image; nothing prevented drift across images. The natural fix — feed the model reference images — isn't possible on Krea 2 natively: its DiT consumes a strict [text | image] token sequence and discards reference latents entirely. There is no slot to attend to.
So v3 adds the anchor at the only layer that allows it: the sampler. Think of it like a sculptor's mold — the reference image is cast into latent space, and every denoising step checks the in-progress latent against the mold inside the box and nudges it closer until the likeness sets. Combined with the v1 masking, each region now has both guarantees: the LoRA can't leave its box, and the identity inside the box can't drift from its reference.
What it does
v3 adds a second engine to the same node: every region row can now carry a reference image alongside its LoRA. Click the "load ref image" button on any row, pick a file, and a thumbnail appears inline on the node — you can see at a glance exactly which image each LoRA is anchored to. During sampling, each reference actively steers its box's in-progress latent toward that image, on top of the LoRA masking.
v3 changelog:
New node:
Krea2 Regional Multi-LoRA v3 + Ref Lock. One node does both jobs: hard per-box LoRA masking (the v1 engine, unchanged) + per-box reference-image guidance (new).Per-row reference upload with inline thumbnails. Each region row gets a "load ref image" button; the image uploads into ComfyUI's input folder and renders as a thumbnail directly on the node. Click the thumbnail to replace, click ✕ to clear. Filenames are stored in
regions_json, so workflows round-trip through save/load and the API.Latent-mold guidance ("Reference Lock"). The reference is VAE-encoded once, resized into its box on the latent grid, and used as a "mold": at every sampling step inside a scheduled window, the model's predicted-clean latent is pulled toward the mold inside the box. Identity converges early; the model spends the remaining steps integrating lighting, seams, and context.
Ref-only regions. A row with a reference image but no LoRA still works — the box is molded toward the image with no LoRA involved. Useful for props, backgrounds, or characters you have images of but no trained LoRA for.
Scheduled guidance window.
ref_start_percent/ref_end_percentcontrol when the steering is active (default 0 → 0.6: lock structure early, release late).New optional
vaeinput (needed to encode references). No VAE wired = LoRA-only, exactly like v1.ref_strength 0also fully disables the reference engine.v1 and v2 nodes are untouched and still registered — old workflows keep working unmodified.
How Reference Lock works (technical)
Krea 2 has no native reference-image pathway — its DiT consumes a strict [text | image] token sequence and discards reference_latents (it's a pure text-to-image model). So v3 intervenes one layer up, at the sampler, which is model-agnostic:
Each reference image is encoded through the VAE into latent space, converted with
process_latent_ininto the model's processing space, and bilinearly fitted into its bounding box on the latent grid. That's the mold.A post-CFG hook (
set_model_sampler_post_cfg_function) runs after every denoising step. ComfyUI hands it the model's predicted-clean latent (denoised/ x0). Inside the guidance window, for each region:
denoised = denoised + ref_strength * mask * (mold - denoised)
maskis the same feathered box mask family as the LoRA engine, built on the latent grid. Outside the box the correction is zero; inside, the latent moves a fixed fraction of the remaining distance toward the mold every step, so the region converges geometrically while staying on the sampler's trajectory.The window is converted from percents to sigma space (
percent_to_sigma), so it tracks the actual noise schedule rather than step indices — correct at any step count.
Because this happens post-CFG at the sampler level, it composes cleanly with the LoRA engine (which lives inside the model forward as masked activation deltas): two different intervention points, no interference. It never touches model weights, so it stays fp8-safe, and it works at Krea 2's native CFG 1.
Knobs and behavior:
KnobDefaultWhat it doesref_strength0.30Per-step pull. 0.2–0.4 anchors identity while integrating with the scene; 0.7+ approaches a paste. 0 = off.ref_start_percent / ref_end_percent0.0 / 0.60Guidance window. Ending ~0.5–0.7 locks identity early and releases the model to blend. Shorter window = looser pose copy.ref_feather0.06Soft edge of the guidance mask.
Honest caveat: latent-mold guidance anchors composition and identity together — the box inherits the reference's pose and framing, not just the face. Crop references to face/torso if you want identity without a full-pose lock, or end the window earlier (ref_end_percent 0.4).
The v3 example workflow is at example_workflows/krea2_regional_multilora_v3.json.
Recent fixes
LoKr (Kronecker) LoRA support. Newer training runs (e.g. recent ai-toolkit builds) can output LoKr files, which store Kronecker factors (lokr_w1 / lokr_w2) instead of the usual lora_A / lora_B pairs. The loader previously recognized only the A/B form, so a LoKr file matched 0 layers and silently did nothing — the LoRA appeared "not to work" even though everything loaded without error. The loader now parses LoKr factors (direct or a @ b-decomposed; tucker/conv variants are skipped) and the forward hook applies kron(w1, w2) · x efficiently via grouped linears — the same identity ComfyUI's own LoKr adapter uses, verified numerically against the materialized Kronecker product (max error ~3e-7) across every layer geometry, including the asymmetric attention projections. Standard LoRAs are unaffected. If a file has neither A/B nor LoKr pairs (e.g. a raw-diff safety-bypass file), it's still skipped with a clear warning — those belong in a normal LoRA loader.
Reliable box → region-row sync. When a bounding-box builder is wired in, the region rows now track box creation/deletion reliably, including deleting the last box (which previously left a stale row). The sync reads the builder's live box array instead of its serialized string (which lags edits and goes empty at zero boxes), re-checks on mouse-up and Delete/Backspace so edits register even when this node isn't the one being redrawn, and guards against clearing your rows during workflow load before the builder has restored its boxes.
# Krea 2 Regional Multi-LoRA — Multi-Character + Bounding-Box Layout Control
Put multiple character LoRAs in a single Krea 2 image, each one locked to its own bounding box — no bleed, no merged faces, no averaging. And it's not just for LoRAs: draw and describe boxes for objects, props, backgrounds, and extra subjects too, exactly like Ideogram 4's bounding-box prompting.
## What it does
Normal LoRA loading applies everywhere, so two character LoRAs smear into each other. This node injects each LoRA's effect only into the image tokens inside its box, at forward time — outside the box the effect is multiplied by zero. It's a hard spatial guarantee, not an attention-bias nudge the model can ignore.
Pair it with an Ideogram 4-style prompt builder and every box does double duty:
- Every box places its described content via Krea 2's Qwen3-VL text encoder (a table, a neon sign, a dog on the left — Krea 2 honors the placement).
- LoRA boxes additionally lock in a specific trained identity on top of that placement.
Sketch the whole scene as boxes, describe each one, and drop LoRAs into the boxes that need a precise face. Objects and characters, all placed by the same boxes.
## Features
- Unlimited regions — 2 characters or 10, add a row per box
- Region rows auto-sync to the boxes you draw (draw a box, a row appears)
- Hard per-region LoRA masking (activation-delta injection)
- Bounding-box layout control for non-LoRA elements too
- fp8-safe — never touches quantized model weights
- Runs at Krea 2's native CFG 1
## Requirements
- ComfyUI with Krea 2 support (recent build)
- Models: krea2_turbo_bf16 (UNet), qwen3vl_4b_bf16 (CLIP, type krea2), qwen_image_vae (VAE)
- Custom node: ComfyUI-Krea2-Regional-MultiLoRA (this workflow's node)
- ComfyUI-KJNodes (for the box-drawing prompt builder)
- Character LoRAs trained against Krea 2 (e.g. via ai-toolkit)
## How to use
1. Write your scene prompt in the box builder (setting/lighting/camera — not the characters).
2. Draw one box per element, in order. Rows appear automatically in the LoRA node.
3. Assign a LoRA to each character box; leave object/scenery boxes as plain descriptions.
4. Sampler: euler / bong_tangent / 8–12 steps / CFG 1.
5. Queue.
## Tips
- Keep character boxes from overlapping to avoid bleed.
- If seams show, raise seam_feather a touch (0.12–0.15).
- Row order must match box order (row 1 = first box drawn).
- Character LoRAs must be Krea 2-trained — FLUX/SDXL LoRAs load but look wrong.
## Node + workflow (GitHub)
Full source, install instructions, and the example workflow:
https://github.com/CliffNodes/Krea2-Multi-Character-Lora-Node-w-bounding-box
License: MIT.
Description
NEW in V12 — Unified Spatial: boxes control placement, scene & outfit transfer, face/body detailer
V12 is a new node (Krea2 Regional Multi-LoRA V12) that keeps everything v1/v3 guaranteed — hard LoRA-to-box masking — and adds the three things people kept asking for:
Boxes now control WHERE and HOW LARGE each subject renders, not just where its LoRA may act.
Scene transfer and outfit transfer — drop your LoRA characters into any real photo, or dress them from a second photo, using only the standard identity edit LoRA. No per-character reference photos, no portrait pre-renders.
An optional Regional Detailer node that re-renders each subject's body and face at high resolution with its own LoRA for maximum likeness.
The V12 example workflow is at example_workflows/krea2_regional_multilora_v12.json. Full version history is in CHANGELOG.md.
What V12 actually does (technical)
One caption, exact token spans. Your box-builder prompt is recompiled into a single scene-wide caption. For each box, V12 resolves the exact Qwen token span of that region's subject clause — including the offset math needed to find the caption inside Krea 2's grounded encoding, where hundreds of vision tokens precede your text. Everything downstream operates on real token positions, not approximations.
Problem this solves: Regional systems can attach the wrong words to the wrong box when token positions are estimated, especially with long prompts or image references.
What this unlocks: Reliable prompt-to-box matching for complex scenes and any number of characters, without requiring users to count tokens or simplify their captions.
Hard cross-modal ownership (fused block-sparse attention). A FlexAttention block mask partitions attention so each region's text span has exclusive ownership of a field inside its box: subject A's tokens structurally cannot influence subject B's pixels, and B's pixels cannot read A's text. This is a hard block, not a bias nudge — the same philosophy as v1's activation masking, applied to attention routing. It is the main cure for identity bleeding between adjacent boxes.
Problem this solves: When multiple people are close together, one character's description or identity can leak into another character, producing blended faces, swapped traits, or duplicate subjects.
What this unlocks: Multiple distinct LoRA characters can stand beside, touch, or interact with each other while retaining separate identities.
Attraction field. Blocking only prevents leakage — nothing pulls a subject into its box, so the model would still place people at its preferred composition. V12 adds a pre-softmax logit boost that binds each regional span to its full box, so subjects materialize inside their boxes.
Problem this solves: Ordinary LoRA masking limits where an identity can act, but does not force the model to generate the person inside that area.
What this unlocks: Boxes become real placement controls: move a box and the associated subject follows it instead of appearing wherever the model prefers.
Box-authoritative framing. The caption's camera sentence is derived from the largest active box height, and close-up wording that contradicts small boxes (e.g. "selfie" with knee-high boxes) is rewritten automatically. The result: a tall box gives you a large foreground subject, a small box gives you a distant full-body subject. Box size is the framing contract.
Problem this solves: Prompt phrases such as "selfie" or "close-up" can fight small boxes, causing oversized people, unwanted close-ups, or extra duplicate figures.
What this unlocks: You control both position and apparent subject size visually: large boxes create foreground subjects, while small boxes create distant or full-body subjects.
Masks that forgive, but never bleed. LoRA delta masks extend past the box edge in a soft "skirt" (35% of box size) so a subject that slightly overflows keeps full identity — but each skirt is Voronoi-limited to halfway across the gap toward any neighboring box, so skirts can never cause cross-identity bleed. Feathering is capped per box (30% of the box's smaller side), so even tiny boxes keep a full-strength LoRA core. Where masks overlap, the stronger region wins outright instead of identities summing.
Problem this solves: A face that lands partly outside its box can lose likeness, while simply enlarging the LoRA mask risks contaminating the neighboring character. Tiny boxes can also weaken a LoRA until it is barely recognizable.
What this unlocks: Strong likeness survives small placement errors and distant subjects without allowing adjacent character LoRAs to mix.
Scene transfer — only the edit LoRA required
Wire any photo into extra_ref_1. The image is generated from noise with your photo as a krea2edit reference frame — so lighting, perspective, shadows and reflections integrate naturally. This is not latent pasting; your characters can lean on the furniture.
edit_lora: the standard Krea 2 identity edit LoRA. That is the only extra model needed.Character likeness comes entirely from your per-region character LoRAs, exactly as before.
refs_jsonrow 1 stays{"role":"scene"}(the default).
Problem this solves: Traditional inpainting often makes characters look pasted into a photo because lighting, perspective, shadows, and contact with the environment are resolved separately.
What this unlocks: Place your LoRA characters naturally inside almost any scene photo using one standard edit LoRA—without training scene LoRAs or supplying a separate portrait reference for every character.
Outfit / object transfer
Wire a second photo into extra_ref_2 with a full-canvas box (0,0,1,1) and describe its role in refs_json:
[{"role":"scene"},
{"role":"object","note":"outfit, worn by the woman"}]The plate becomes its own reference frame and the node writes the referring text ("the outfit from the third reference") with the correct frame number automatically. Roles: auto | scene | person | object | style. The note is "noun, where it goes".
Problem this solves: A text prompt alone cannot faithfully reproduce a particular outfit, prop, product, or visual design from another image, and reference numbering becomes error-prone as more plates are added.
What this unlocks: Borrow a specific outfit or object from a second image and direct it to the intended character while preserving that character's LoRA identity and the first image's scene.
Regional Detailer (optional but recommended)
Krea2 Regional Detailer sits between VAEDecode and SaveImage (already wired in the example workflow):
Body pass: crops each subject's box with context, upscales it, and re-renders it img2img with that region's own LoRA.
Face pass: detects the actual faces in the final image (YOLOv8
face_yolov8m.ptif you have it, OpenCV Haar fallback), assigns each face to its region one-to-one by proximity, and re-renders each face at high resolution with the correct LoRA — wherever the face actually rendered. Even a subject that drifted across its box seam gets its identity restored in place.Feathered paste-back, pixel budget capped,
skip_above_pxlets you refine only small/distant subjects.
Cost: roughly 40–60 s for two subjects (8 steps each pass) on top of the main generation.
Problem this solves: Small or distant faces may not contain enough pixels for strong likeness, and subjects can drift across box boundaries during the initial generation.
What this unlocks: High-detail, LoRA-accurate faces for two, three, or more characters—even when their final rendered positions do not perfectly match the original boxes.
How to use the V12 workflow, step by step
Load example_workflows/krea2_regional_multilora_v12.json. Every input on the nodes has a hover tooltip explaining what it does — hover anything you're unsure about.
Models:
krea2_turbo_bf16.safetensors(UNET),qwen3vl_4b_bf16.safetensors(CLIP, typekrea2),qwen_image_vae.safetensors(VAE), and the Krea 2 identity edit LoRA in the V12 node'sedit_loraslot.Scene photo: load your scene into the
LoadImagewired toextra_ref_1. (To generate without a scene, disconnect it and setuse_krea2editoff.)Prompt: in the box builder, describe the overall scene and what the people are doing — "man and woman standing in a modern kitchen, posing for a photo together, the man has his arm around the woman". Keep
background is from reference photo 1when using a scene photo. Interactions between subjects (arm around, holding hands) belong here.Boxes: draw one box per character, sized like the person should appear — tall box = close/large subject, small box = distant subject. Give each box a short generic description ("man", "woman"). Don't overlap boxes; leave a small gap.
Regions: in the V12 node, each row pairs with its box in order. Pick each row's character LoRA and strength (start at 1.3–1.4, with
base_strength1.1). Row prompts stay short and generic ("a man"); the identity comes from the LoRA, not the words.Outfit transfer (optional): load the outfit photo into the
LoadImagewired toextra_ref_2and keep therefs_jsonobject role. Remove/disconnect it if unused.Sampler:
euler/simple, 8–12 steps, CFG 1.0 (already set).Detailer: leave
enableon for the extra face/body pass, or turn it off to A/B its effect. If furniture inside the boxes gets re-textured, lowerbody_denoiseto ~0.20 — the face pass carries the identity work.Queue. First V12 run compiles the fused attention kernel (~1 min one-time overhead per session); subsequent runs are fast.
V12 knobs worth knowing
KnobDefaultWhat it doesbase_strength1.1Global multiplier on all region strengths.grounding_px1024Vision-grounding resolution for the scene photo.edit_lora_strength0.68Edit LoRA weight. Raise region strengths → lower this.ref_max_side0 (native)Main speed knob: downscales reference frames before encoding. Raise likeness by keeping 0; gain speed by setting ~1024.blend_override0Leave at 0 — anything higher blends LoRAs canvas-wide.Detailer body_denoise / face_denoise0.30 / 0.400 disables that pass.Detailer lora_scale0.70Region strength × this for refinement passes (full-model patch runs hotter than delta injection).
V12 requirements
Recent PyTorch with FlexAttention (
torch >= 2.5; tested on 2.11) and a workingtorch.compile(Triton). If you already run sage attention, you have this.Optional, for best face detection in the Detailer:
pip install ultralyticsandface_yolov8m.ptinComfyUI/models/ultralytics/bbox/(the standard ADetailer face model). Without it, an OpenCV fallback is used.Everything else is inherited from the base package (torch, safetensors — no other custom-node dependencies).
NEW in v3 — Reference Lock: per-region reference images
Why v3 exists
v1 solved spatial bleeding: two LoRAs in the same generation influencing each other's tokens. The masking guarantees LoRA A stays in box A. But that left a second, different problem on the table: identity drift. A LoRA gives you the distribution of a character, not a fixed likeness — run 20 seeds and the face wanders; generate a series of shots and shot 12 doesn't quite match shot 1. Perfect spatial isolation in every frame, and still no anchor holding the identity constant across generations.
Those are orthogonal problems, and the community discussion around v1 made that sharp: bounding boxes prevent bleed within an image; nothing prevented drift across images. The natural fix — feed the model reference images — isn't possible on Krea 2 natively: its DiT consumes a strict [text | image] token sequence and discards reference latents entirely. There is no slot to attend to.
So v3 adds the anchor at the only layer that allows it: the sampler. Think of it like a sculptor's mold — the reference image is cast into latent space, and every denoising step checks the in-progress latent against the mold inside the box and nudges it closer until the likeness sets. Combined with the v1 masking, each region now has both guarantees: the LoRA can't leave its box, and the identity inside the box can't drift from its reference.
What it does
v3 adds a second engine to the same node: every region row can now carry a reference image alongside its LoRA. Click the "load ref image" button on any row, pick a file, and a thumbnail appears inline on the node — you can see at a glance exactly which image each LoRA is anchored to. During sampling, each reference actively steers its box's in-progress latent toward that image, on top of the LoRA masking.
v3 changelog:
New node:
Krea2 Regional Multi-LoRA v3 + Ref Lock. One node does both jobs: hard per-box LoRA masking (the v1 engine, unchanged) + per-box reference-image guidance (new).Per-row reference upload with inline thumbnails. Each region row gets a "load ref image" button; the image uploads into ComfyUI's input folder and renders as a thumbnail directly on the node. Click the thumbnail to replace, click ✕ to clear. Filenames are stored in
regions_json, so workflows round-trip through save/load and the API.Latent-mold guidance ("Reference Lock"). The reference is VAE-encoded once, resized into its box on the latent grid, and used as a "mold": at every sampling step inside a scheduled window, the model's predicted-clean latent is pulled toward the mold inside the box. Identity converges early; the model spends the remaining steps integrating lighting, seams, and context.
Ref-only regions. A row with a reference image but no LoRA still works — the box is molded toward the image with no LoRA involved. Useful for props, backgrounds, or characters you have images of but no trained LoRA for.
Scheduled guidance window.
ref_start_percent/ref_end_percentcontrol when the steering is active (default 0 → 0.6: lock structure early, release late).New optional
vaeinput (needed to encode references). No VAE wired = LoRA-only, exactly like v1.ref_strength 0also fully disables the reference engine.v1 and v2 nodes are untouched and still registered — old workflows keep working unmodified.
How Reference Lock works (technical)
Krea 2 has no native reference-image pathway — its DiT consumes a strict [text | image] token sequence and discards reference_latents (it's a pure text-to-image model). So v3 intervenes one layer up, at the sampler, which is model-agnostic:
Each reference image is encoded through the VAE into latent space, converted with
process_latent_ininto the model's processing space, and bilinearly fitted into its bounding box on the latent grid. That's the mold.A post-CFG hook (
set_model_sampler_post_cfg_function) runs after every denoising step. ComfyUI hands it the model's predicted-clean latent (denoised/ x0). Inside the guidance window, for each region:
denoised = denoised + ref_strength * mask * (mold - denoised)
maskis the same feathered box mask family as the LoRA engine, built on the latent grid. Outside the box the correction is zero; inside, the latent moves a fixed fraction of the remaining distance toward the mold every step, so the region converges geometrically while staying on the sampler's trajectory.The window is converted from percents to sigma space (
percent_to_sigma), so it tracks the actual noise schedule rather than step indices — correct at any step count.
Because this happens post-CFG at the sampler level, it composes cleanly with the LoRA engine (which lives inside the model forward as masked activation deltas): two different intervention points, no interference. It never touches model weights, so it stays fp8-safe, and it works at Krea 2's native CFG 1.
Knobs and behavior:
KnobDefaultWhat it doesref_strength0.30Per-step pull. 0.2–0.4 anchors identity while integrating with the scene; 0.7+ approaches a paste. 0 = off.ref_start_percent / ref_end_percent0.0 / 0.60Guidance window. Ending ~0.5–0.7 locks identity early and releases the model to blend. Shorter window = looser pose copy.ref_feather0.06Soft edge of the guidance mask.
Honest caveat: latent-mold guidance anchors composition and identity together — the box inherits the reference's pose and framing, not just the face. Crop references to face/torso if you want identity without a full-pose lock, or end the window earlier (ref_end_percent 0.4).
The v3 example workflow is at example_workflows/krea2_regional_multilora_v3.json.
Recent fixes
LoKr (Kronecker) LoRA support. Newer training runs (e.g. recent ai-toolkit builds) can output LoKr files, which store Kronecker factors (lokr_w1 / lokr_w2) instead of the usual lora_A / lora_B pairs. The loader previously recognized only the A/B form, so a LoKr file matched 0 layers and silently did nothing — the LoRA appeared "not to work" even though everything loaded without error. The loader now parses LoKr factors (direct or a @ b-decomposed; tucker/conv variants are skipped) and the forward hook applies kron(w1, w2) · x efficiently via grouped linears — the same identity ComfyUI's own LoKr adapter uses, verified numerically against the materialized Kronecker product (max error ~3e-7) across every layer geometry, including the asymmetric attention projections. Standard LoRAs are unaffected. If a file has neither A/B nor LoKr pairs (e.g. a raw-diff safety-bypass file), it's still skipped with a clear warning — those belong in a normal LoRA loader.
Reliable box → region-row sync. When a bounding-box builder is wired in, the region rows now track box creation/deletion reliably, including deleting the last box (which previously left a stale row). The sync reads the builder's live box array instead of its serialized string (which lags edits and goes empty at zero boxes), re-checks on mouse-up and Delete/Backspace so edits register even when this node isn't the one being redrawn, and guards against clearing your rows during workflow load before the builder has restored its boxes.
FAQ
Comments (7)
If i understood things right, I just add the trigger words of each lora in each of the boxes? Can this be expanded like "eastwood doing a peace sign" or stuff like that?
Yes absolutely
You can have two Loras interact with each other
@ftrbzmogul355 awesome, thanks!
I tried to run it, but I kept getting "TypeError: Ideogram4PromptBuilderKJ.execute() got an unexpected keyword argument 'size_width'"
In the end I disconnected the resolution selector and set the sizes directly in the node.
But I now get the error "RuntimeError: V12 unified attention was not armed"
I am running it on Linux and I do not have Triton, does it matter?
I sorted it out, it was some issue with the reference image. Now it works, testing it out
glad you were able to figure it out! Let me know if there are any other errors would love to help



















