Nodes/RegioCraft/RegioCraft (Regional Multi-LoRA + Ref Lock)
ComfyUI Node

RegioCraft (Regional Multi-LoRA + Ref Lock)

RegioCraft

By zeus-onl·Created 2 months ago·Updated 11 days ago· 11
RegioCraft (Regional Multi-LoRA + Ref Lock)
  • model
  • clip
  • bboxes
  • vae
  • model
  • clip
  • mask_preview
  • info
  • conditioning
canvas_width1024
canvas_height1024
regions_json[ {"lora": "None", "strength": 1.2, "enable": true, "ref_image": "", "prompt": "", "trigger": "", "x": 0.0, "y": 0.0, "w": 0.5, "h": 1.0}, {"lora": "None", "strength": 1.2, "enable": true, "ref_image": "", "prompt": "", "trigger": "", "x": 0.5, "y": 0.0, "w": 0.5, "h": 1.0} ]
base_prompt
text_strength1.00
auto_activate_from_promptfalse
split_modemanual
seam_feather0.08
blend_override0.00
sparse_threshold0.010
steps_without_applying0
lora_ramp_calls0
attention_isolation0.0
ref_strength0.00
ref_start_percent0.00
ref_end_percent0.60
ref_feather0.06
identity_providernone
identity_ref_boost4.0
base_strength1.00
region_prompt_1
region_prompt_2
region_prompt_3
region_prompt_4
region_prompt_5
region_prompt_6
region_prompt_7
region_prompt_8

You know the failure. Load "Alice" and "Bob" into one KSampler, ask for Alice on the left and Bob on the right, and the model hands you one person who's somehow both of them, in both spots. It's the most-asked question in the character-consistency canon, and the classic answers - Latent Couple, Attention Couple, prompt-area conditioning - only got you so far. RegioCraft is the modern, Krea2/Flux.2-Klein-era version of that idea, and it's structurally different: it doesn't just tell the sampler which prompts live where, it masks the LoRA deltas themselves, so each character LoRA is multiplied by zero everywhere outside its own hand-drawn box.

That distinction is the whole pitch. A normal LoRA stack applies every LoRA uniformly to the whole latent. RegioCraft injects each region's LoRA/LoKr through forward hooks that only fire inside that region's mask - there's no mathematical path for Alice's LoRA to bleed into Bob's half, not because it's discouraged but because it's impossible. On top of that delta masking it layers an optional cross-region attention dampener (so query tokens in one box attend less to key/value tokens in another) and a "Reference Lock" that VAE-encodes a reference image, resizes it into the region's box as a latent mold, and nudges the denoised prediction toward it every step inside a scheduled window.

The node is a merge of three earlier regional-LoRA nodes (Gorecheese's activation-delta masking, Shy's sparse-token/attention-isolation work, Fedor's bounding-box node with Reference Lock), and it shows - this thing has more knobs than a regional-characters beginner strictly needs. Ignore most of them at first. The ones that actually matter:

  • The canvas. Draw a box per character, assign a LoRA per region, done. Drag a box and its LoRA moves with it - box position is region identity, so there's no slot-numbering to trip over.
  • base_prompt - the overall scene (composition, setting, lighting). If a region has a trigger name and you flip on auto_activate_from_prompt, writing "Alice and Bob talking" activates those regions by themselves.
  • split_mode - manual (your boxes, default), or auto_vertical/auto_horizontal for equal strips. seam_feather softens the borders between regions.
  • sparse_threshold (default 0.01) - skips LoRA math on near-zero masked tokens; 0 is safest and slowest.
  • steps_without_applying / lora_ramp_calls - warm-up: let the base composition settle before the regional identities slam in.

If you want identity anchoring across seeds, wire a vae in and set ref_strength above 0, with ref_start_percent/ref_end_percent for the window (0 → 0.6 is a sane default). For per-region text prompts there are real region_prompt_1region_prompt_8 STRING sockets you can drive from a wildcard generator. Outputs: model → KSampler, conditioning → its positive input (a plain CLIPTextEncode upstream isn't enough if you use base_prompt or per-region prompts), plus mask_preview, info, and a passthrough clip.

One advanced dial worth knowing: identity_provider = krea2edit routes reference-image regions through comfyui-krea2edit's trained identity-preservation path - add a region prompt alongside the ref image and it becomes a grounded edit instruction ("give him a hooked nose") via Qwen3-VL. That needs the krea2edit node and LoRA installed, so treat it as an add-on, not setup.

Install

ComfyUI Manager → search "RegioCraft", or:

cd ComfyUI/custom_nodes
git clone https://github.com/zeus-onl/RegioCraft

Restart ComfyUI and add RegioCraft → "RegioCraft (Regional Multi-LoRA + Ref Lock)". No Python dependencies beyond what ComfyUI already ships - the pyproject declares nothing extra - and it's fp8-safe: it hooks activations, never quantized weights, so it works on Krea2 Turbo quantizes where ComfyUI's native hook-LoRA path crashes.

Where people get burned

  • "Characters still look merged" - your boxes overlap. Shrink them and/or lower seam_feather.
  • "0 layers matched" in the console - that LoRA's key format doesn't map onto the loaded model. Usually a different architecture or a heavily merged fine-tune.
  • One character right, the other generic - the box misses the face. And this is the rule: the box marks where the LoRA is injected. Most character LoRAs are face/portrait-trained, so be generous - a box that just misses the head gives you a weak identity.
  • "Failed to validate prompt" after an update - ComfyUI stores widget values positionally, so a field-order change in an update can scramble a stale node instance's saved values. Delete the old node, drag in a fresh one, rewire. One-time annoyance per update, not a per-run bug.

It's a young node, so if you hit something genuinely weird, the README and the pack's GitHub beat any forum search. But for the classic two-characters-one-image problem on Krea2 or Flux.2-Klein, this is currently the cleanest answer around.

CategoryRegioCraft

Inputs (32)

NameTypeDefaultDescription
modelMODEL
clipCLIP
canvas_widthINT102464–16384
canvas_heightINT102464–16384
regions_jsonSTRING[ {"lora": "None", "strength": 1.2, "enable": true, "ref_image": "", "prompt": "", "trigger": "", "x": 0.0, "y": 0.0, "w": 0.5, "h": 1.0}, {"lora": "None", "strength": 1.2, "enable": true, "ref_image": "", "prompt": "", "trigger": "", "x": 0.5, "y": 0.0, "w": 0.5, "h": 1.0} ]JSON array, in box order: {"lora":"file.safetensors", "strength":1.2, "enable":true, "ref_image":"uploaded.png", "prompt":"optional per-region text"}. Unlimited rows. LoRA and LoKr files both work.
base_promptSTRINGOverall scene prompt (composition, setting, lighting). Combined with each region's own text (if any) for that region's masked conditioning. Also scanned for trigger names if auto_activate_from_prompt is on.
text_strengthFLOAT1.000–2Blend strength of each region's masked text conditioning.
auto_activate_from_promptBOOLEANfalseIf a region has a 'trigger' name set, that region is only active when its trigger word appears (case-insensitive) in base_prompt -- the region's own enable toggle is ignored in that case. Regions with no trigger set keep using their enable toggle as normal (handy for LoRAs that don't need a trigger word to activate).
split_modeCOMBOmanual4 options: manual, bbox, auto_vertical, auto_horizontal
seam_featherFLOAT0.080–0.5
blend_overrideFLOAT0.000–1
sparse_thresholdFLOAT0.0100–0.2Skip LoRA/LoKr compute on tokens below this mask value. 0=safest/slowest.
steps_without_applyingINT00–64Let the base model establish composition for N model calls first.
lora_ramp_callsINT00–640=off. 1=50->100%, 2=33->66->100%, relative to selected strength.
attention_isolationFLOAT0.00–120=off. >0 dampens cross-region attention (not just the LoRA delta). Try 4-8.
ref_strengthFLOAT0.000–1Per-step pull toward each region's reference image. 0=off.
ref_start_percentFLOAT0.000–1
ref_end_percentFLOAT0.600–1
ref_featherFLOAT0.060–0.5
identity_providerCOMBOnonePhase 3 (2026-08-02): 'none' = old behavior, unchanged. 'krea2edit' runs the FULL diffusion forward through comfyui-krea2edit's trained identity-preservation path (replaces this node's normal forward ONCE per model call, never once per region) for any active region that has a ref_image set. Region-LoRA hooks and attention isolation stay active around that call -- RegioCraft remains the sole owner of the model wrapper. Capped at 2 simultaneous refs (that LoRA's trained limit); extra ref_image regions beyond that are logged and ignored, not an error. Requires the comfyui-krea2edit custom node + its LoRA installed, and a 'vae' connected to this node. EDIT INSTRUCTIONS (2026-08-18): if a region also has its own 'prompt' text filled in alongside ref_image, that text is grounded on the ref image (Qwen3-VL, training-matched template) and used as an actual edit instruction, e.g. 'give him a hooked nose' -- no extra toggle needed, ref_image+prompt together IS the signal. Regions with only ref_image (no prompt) keep doing pure identity/face-lock as before. Only ONE combined instruction applies per model call -- if several regions have both ref_image and prompt at once, their texts are concatenated into a single instruction, not applied separately per region.
identity_ref_boostFLOAT4.00–1000Reference-fidelity dial passed to the identity provider (Krea2Edit's ref_boost). Ignored if identity_provider='none'. 1.0=off, ~4.0=strong likeness (provider's own recommended default), >10=over-copy risk.
bboxesoptBOUNDING_BOX
vaeoptVAERequired to enable reference-image regions.
base_strengthoptFLOAT1.00-10–10
region_prompt_1optSTRINGConnect an external text node here to drive region 1's prompt dynamically (e.g. a wildcard/random prompt generator). Overrides whatever's typed into region 1's own prompt field when connected.
region_prompt_2optSTRING
region_prompt_3optSTRING
region_prompt_4optSTRING
region_prompt_5optSTRING
region_prompt_6optSTRING
region_prompt_7optSTRING
region_prompt_8optSTRINGRegion 9+ have no dedicated input socket (fixed cap of 8) -- type their prompts directly into each region's own prompt field.

Outputs (5)

NameTypeDescription
modelMODEL
clipCLIP
mask_previewIMAGE
infoSTRING
conditioningCONDITIONING