ComfyUI Node
K2 Region from BBox
Turns a detector bounding box into a K2 region. Accepts BBOX/BOUNDING_BOX lists as produced by KJNodes' Ideogram prompt builder, YOLO detectors or FVM person selectors. Supports xywh and xyxy, absolute pixels or normalized 0..1 coordinates.
K2 Region from BBox
- regions
- bboxes
- bounding_box
- regions
◄nameSubject►
◄prompt►
◄bbox_index0►
◄bbox_formatxyxy►
◄reference_width1024►
◄reference_height1024►
◄grow_px0►
◄roleauto►
◄priority100►
◄identity_prompt►
CategoryFVM Tools/K2
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| name | STRING | Subject | Label for this detected region. Must be unique. |
| prompt | STRING | What should appear inside the detected box. | |
| bbox_index | INT | 00–64 | Zero-based index into the bbox list. Out-of-range clamps to the last entry. |
| bbox_format | COMBO | xyxy | xyxy = left/top/right/bottom (what YOLO, BOUNDING_BOX and the KJ prompt builder emit). xywh = left/top/width/height. auto tries xyxy first and only falls back to xywh when that yields an impossible box — it cannot always tell them apart, so set the format explicitly when you know it. |
| reference_width | INT | 102416–16384 | Canvas width used to expand normalized coordinates. |
| reference_height | INT | 102416–16384 | Canvas height for normalized coordinates. Must match the render size. |
| grow_px | INT | 0-512–512 | Expand (or shrink) every side. |
| role | COMBO | auto | subject / background / auto — same meaning as on K2 Region. |
| priority | INT | 100-1000–1000 | Higher compiles first and claims ambiguous faces first. |
| regionsopt | K2_REGION | Chain input: previously defined regions. | |
| bboxesopt | BBOX | KJNodes-style BBOX list. | |
| bounding_boxopt | BOUNDING_BOX | Standard BOUNDING_BOX input. Takes precedence over bboxes. | |
| identity_promptopt | STRING | Face/identity description for this region. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| regions | K2_REGION | — |