ComfyUI Node

K2 Region

Defines one named pixel-space region for Krea 2 regional prompting. The box is given in output pixels of the final image. Its prompt is compiled into the unified Krea prompt with an explicit location clause, and the K2 attention router binds exactly those text tokens to the image tokens inside this box. Chain several Region nodes through the 'regions' input to build a layout.

By ping1979ping·Created 5 months ago·Updated 21 days ago· 0
K2 Region
  • regions
  • regions
nameSubject
prompt
x0
y0
width512
height1024
roleauto
priority100
enabledtrue
identity_prompt
negative_prompt
region_id
CategoryFVM Tools/K2

Inputs (13)

NameTypeDefaultDescription
nameSTRINGSubjectHuman 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.
promptSTRINGWhat should appear inside this box. An empty prompt disables the region.
xINT00–16384Left edge in output pixels.
yINT00–16384Top edge in output pixels.
widthINT51216–16384Box width in output pixels.
heightINT102416–16384Box height in output pixels.
roleCOMBOautosubject: 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.
priorityINT100-1000–1000Higher compiles first and claims ambiguous detected faces first. It is NOT a strength and NOT an image z-index.
enabledBOOLEANtrueExclude the region without deleting it.
regionsoptK2_REGIONChain input: previously defined regions.
identity_promptoptSTRINGFace/identity description. It is placed first in the clause, can be protected from the projector delta, and is preferred by K2 Face Detail.
negative_promptoptSTRINGRegion-local negative text. Stored for tooling; Krea 2 Turbo has no separate regional negative branch (CFG-free).
region_idoptSTRINGStable internal id. Leave empty for an automatic one. Regional LoRAs reference regions by name or id.

Outputs (1)

NameTypeDescription
regionsK2_REGION