K2 Region
One named box, one prompt, and the start of real multi-character control
- regions
- regions
K2 Region is the building block of the whole K2 Lab suite in comfyui-FVMtools. It's one named rectangle on your canvas with one prompt, and when you chain a few of them together you get the thing the community kept asking for all through 2026: two different characters, each bound to their own part of the frame, without them blending into one averaged mess. Each region's prompt gets compiled into the unified Krea 2 prompt with an explicit location clause, and the K2 attention router binds exactly those text tokens to the image tokens inside that box.
The boxes are given in output pixels of the final image - one image token in Krea 2 covers a 16×16 block of output pixels, so that's the coordinate space the node thinks in.
The inputs that matter
name- the label used everywhere else: in the generated spatial instructions ("Anna is to the left of Bea"), in face assignment, in reports. Keep it short and distinct.prompt- what appears inside the box. An empty prompt disables the region.x,y,width,height- the box, in output pixels.role- how hard the region is bound.subjectgets the full outside penalty and competes with other subjects for overlapping tokens;backgroundonly gets a quarter of the penalty and may feather beyond its box (how far is controlled by thefalloff_pixelsfield on spatial tuning);autopromotes any box covering 70%+ of canvas width to background.priority- higher compiles first and claims ambiguous detected faces first. The tooltip is worth quoting: it is not a strength and not an image z-index. Don't crank it expecting a stronger effect.
Optional inputs: identity_prompt (face/identity description - it's placed first in the clause, can be protected from the projector delta, and is preferred by K2 Regional Face Detail), negative_prompt (stored for tooling; Krea 2 Turbo is CFG-free so it has no separate regional negative branch), and region_id (a stable id if you don't want an autogenerated one).
Chain them
The regions output plugs into the next K2 Region's regions input, building a chain that ends at K2 Compose. It's a linked list rather than a bus - if you need to merge two independently-built chains, use K2 Region Combine.
A couple of habits the author's own testing suggests: keep people out of the global prompt and describe subjects here (a scene-only global prompt produced 2 faces, "…a woman standing…" produced 3). And put framing into the region prompt, not the global one - "shown full length" belongs here, because the model reads camera distance from whichever prompt the tokens are attached to.
Install is the same as the rest of the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/ping1979ping/comfyui-FVMtools
Restart ComfyUI and the nodes appear under FVM Tools/K2. No extra Python dependencies for this suite, and no model files beyond the Krea 2 checkpoint, encoder, and VAE you already need to run Krea 2 at all.
If you'd rather not hand-type boxes, use K2 Region Builder for a visual editor or K2 Region from BBox to pull boxes straight off a detector. Two to three subjects land reliably with this approach; four narrow full-body boxes get tight, and the fix is more width per box plus inside_strength around 2.6.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| name | STRING | Subject | Human readable label. Used in the generated spatial instructions ('Anna is to the left of Bea'), in face assignment and in the report. Keep it short and distinct. |
| prompt | STRING | What should appear inside this box. An empty prompt disables the region. | |
| x | INT | 00–16384 | Left edge in output pixels. |
| y | INT | 00–16384 | Top edge in output pixels. |
| width | INT | 51216–16384 | Box width in output pixels. |
| height | INT | 102416–16384 | Box height in output pixels. |
| role | COMBO | auto | subject: full outside penalty, competes with other subjects for overlapping tokens. background: softer penalty, may feather beyond its box. auto: boxes covering >=70% of canvas width become background. |
| priority | INT | 100-1000–1000 | Higher compiles first and claims ambiguous detected faces first. It is NOT a strength and NOT an image z-index. |
| enabled | BOOLEAN | true | Exclude the region without deleting it. |
| regionsopt | K2_REGION | Chain input: previously defined regions. | |
| identity_promptopt | STRING | Face/identity description. It is placed first in the clause, can be protected from the projector delta, and is preferred by K2 Face Detail. | |
| negative_promptopt | STRING | Region-local negative text. Stored for tooling; Krea 2 Turbo has no separate regional negative branch (CFG-free). | |
| region_idopt | STRING | Stable internal id. Leave empty for an automatic one. Regional LoRAs reference regions by name or id. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| regions | K2_REGION | — |