IAMCCS Krea 2 Studio Regional
Regional prompts as soft masks, no external node required
- model
- clip
- model
- positive
- negative
- studio_data
This is the v1 of the Krea 2 Studio idea, and it does the job in the plainest way available: it turns your draggable boxes into masked conditioning. No external regional-attention node, no LoRA trickery unless you ask for it - just positive conditioning carrying several masked regional entries next to the global scene prompt.
If you already know you want Fedor's unified-spatial V12 engine, use IAMCCSKrea2StudioLayoutV12 instead. This one is the version that runs on the pack alone.
Inputs
Required: model, clip, canvas_width, canvas_height (default 1024×1024), scene_prompt, negative_prompt, regions_json (default []), seam_feather (0.08), base_lora_strength (1.0).
regions_json is the same document the V12 node consumes: a list of up to 16 regions with id, name, enabled, prompt, prompt_strength, lora, lora_strength, feather, priority and a normalised box. Only enabled regions with a prompt or a LoRA are compiled; an empty document is an error rather than a silent pass-through.
How it compiles
It encodes the scene prompt once as the base positive, then encodes each region's prompt separately and attaches a soft mask to that entry - mask set from the box with mask_strength taken from prompt_strength, and set_area_to_bounds explicitly false. That last flag is a compatibility detail: Krea 2 exposes a temporal latent dimension even for stills, and ComfyUI's multidimensional bounds optimiser would otherwise add a batch/time axis to the area and mis-handle the mask. Turning the optimiser off keeps the full conditioning area and lets the soft mask do the gating.
The result is a positive list of several conditioning entries, which is exactly how ComfyUI regional prompting has always worked: your sampler sees the global prompt plus a weighted local one for each region. Regions are priority-exclusive, so overlapping boxes resolve in order rather than averaging.
seam_feather softens the box edges - this is a soft mask, not an inpaint, so edges are a gradient you're choosing, not a binary cut. Empty negative_prompt gets you a zeroed-out version of the scene text rather than an unconnected negative.
If any region carries a LoRA, the model side is patched by delegating to Krea2RegionalMultiLoRA with bbox split mode: one adapter row per region, sorted by priority, background included, blend_override 0 so the per-region strengths are respected rather than softened. This dependency is resolved at execution time, so the pack imports fine without Fedor's node installed - you only get the error when you actually ask for regional LoRAs, and the message names the node you need.
Outputs
model, positive, negative, studio_data. Wire the first three into your sampler the way you would a normal encode. studio_data is JSON: contract id, canvas, region count, and for each region its id, priority, box and whether it carried a prompt or a LoRA. When a region doesn't show up in the render, that string tells you whether it compiled at all.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git
Or Manager, searching IAMCCS. Restart. No models to download - but you do need Krea 2 with its Qwen3-VL text encoder and Qwen-Image VAE, loaded through stock ComfyUI Krea 2 nodes. Regional LoRA routing adds the Krea2RegionalMultiLoRA dependency on top.
Where it bites
- Soft masks are soft. Put two subjects' boxes close together and you get blending at the boundary.
seam_featherdown, priorities explicit. - At least one region must actually do something. An all-disabled document raises
Krea 2 Studio needs at least one enabled region with a prompt or LoRA, which is a better outcome than an empty positive. - Regional prompts fight the model's own knowledge. Krea 2 knows characters, costumes and styles without LoRAs, but it will pick the wrong version of a thing given a vague name - the classic example being a sequel instead of the original series. Be specific inside the boxes too.
- This is not inpainting. If a region keeps losing to the scene, don't add more regions; simplify the scene prompt so it stops describing what the region is supposed to own.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| canvas_width | INT | 102464–16384 | — |
| canvas_height | INT | 102464–16384 | — |
| scene_prompt | STRING | — | |
| negative_prompt | STRING | — | |
| regions_json | STRING | [] | — |
| seam_feather | FLOAT | 0.080–0.5 | — |
| base_lora_strength | FLOAT | 1.00-10–10 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| studio_data | STRING | — |