Nodes/comfyui-fvmtools/K2 Region Builder
ComfyUI Node

K2 Region Builder

Visual region editor for Krea 2 — boxes, per-box prompts and per-box LoRAs in a single node. Press 'Edit layout' to open a detached editor window: drag and resize boxes on the canvas, give each one a prompt and an identity prompt, and attach any number of LoRAs per box with their own strength and routing mode. 'Backdrop' loads a recent render behind the canvas so boxes can be placed against a real composition. Boxes are stored NORMALIZED (0..1) and rescaled shape-preserving when the canvas changes: a box keeps its width-to-height ratio and its relative centre instead of being squashed. That is the part plain fraction-based editors get wrong — there a square box silently turns into a wide rectangle when you go from 1:1 to 16:9. Wire regions + loras + global_prompt + width + height straight into K2 Compose.

By ping1979ping·Created 5 months ago·Updated 21 days ago· 0
K2 Region Builder
    • regions
    • loras
    • global_prompt
    • width
    • height
    • report
    width1024
    height1024
    global_prompt
    layout{ "version": 1, "canvas": { "width": 1024, "height": 1024 }, "boxes": [] }
    CategoryFVM Tools/K2

    Inputs (4)

    NameTypeDefaultDescription
    widthINT102464–16384Output width. Changing it rescales the layout shape-preserving instead of distorting the boxes.
    heightINT102464–16384Output height. Same shape-preserving rescale applies.
    global_promptSTRINGScene ONLY — no people. Describe the subjects in their boxes instead. Image tokens outside every region see only this text, so any person mentioned here gets drawn there. Measured with two regions: 'a sunlit park lawn with tall trees' → 2 faces, 'photo of a woman standing in a sunlit park' → 3, 'group portrait photo' → 5. Even the singular adds one too many.
    layoutSTRING{ "version": 1, "canvas": { "width": 1024, "height": 1024 }, "boxes": [] }Layout JSON written by the editor window. The frontend hides this widget; you can still edit it by hand or paste a saved layout.

    Outputs (6)

    NameTypeDescription
    regionsK2_REGION
    lorasK2_LORA
    global_promptSTRING
    widthINT
    heightINT
    reportSTRING