ComfyUI Node Runs on cloud
Bounding Box Editor
Draw layout boxes on a picture or a blank frame and give each a kind, caption, text and colour palette. Hands them on as bounding boxes, prompt elements, bounds and masks for MOSS-Image and FLUX 3 layout prompts and the cropping and masking nodes. A layout drawn at one size is refitted to another without stretching.
Bounding Box Editor
- image
- bboxes
- preview
- bboxes
- elements
- width
- height
- character_boxes
- bounds
- masks
◄width1024►
◄height1024►
◄layout►
◄on_resizefit►
◄grid16►
◄bboxes_modeadd►
CategoryWAS Suite/Image/Bound
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 102416–16384 | Frame width in pixels when no image is wired. `1024` = 1024px wide. A wired image's own width replaces it. |
| height | INT | 102416–16384 | Frame height in pixels when no image is wired. `1024` = 1024px tall. A wired image's own height replaces it. |
| layout | STRING | The boxes as JSON the panel writes, such as `{"frame": [1344, 768], "boxes": [...]}`. Empty = no boxes. Paste a layout from another Bounding Box Editor, a Create Bounding Boxes box list or a prompt element list. | |
| on_resize | COMBO | fit | Used when the layout was drawn at another frame size. `fit` = whole layout inside, unstretched; `fill` = covers the frame, edges may be cut; `stretch` = scaled to the frame, shapes change; `keep size` = pixel size kept, centred. |
| grid | INT | 161–256 | Pixels box edges snap to while drawing in the panel and when a layout is refitted. `1` = no snapping; `16` = 16px steps; `64` = coarse blocks. |
| bboxes_mode | COMBO | add | `add` = incoming boxes come after the layout's own; `replace` = only the incoming boxes are output; `ignore` = the input is not read. |
| imageopt | IMAGE | Optional picture to lay boxes over. Its size replaces width and height, and its first frame is drawn behind the boxes in the panel and preview. | |
| bboxesopt | BOUNDING_BOX,BOUNDING_BOXES,ARRAY,STRING | Boxes to start from: SAM3 Detect or Run Real-Time Detection results, a Create Bounding Boxes output, prompt elements or JSON text, in the frame's pixels. bboxes_mode decides how they join the layout. |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| preview | IMAGE | The boxes numbered and captioned over the image, or over a dark frame, at most 1024px on the long edge. |
| bboxes | BOUNDING_BOX | Every box in pixels, carrying its kind, caption, text and palette, for Crop By Bounding Boxes, Draw BBoxes, SAM3 Detect or another editor. |
| elements | ARRAY | Prompt elements for MOSS-Image Layout Prompt and FLUX 3 Image Layout Prompt, numbered back to front as the preview shows. |
| width | INT | Width of the frame the boxes are in: the image's when one is wired, otherwise the width widget. Wire it into the layout prompt's width. |
| height | INT | Height of the frame the boxes are in: the image's when one is wired, otherwise the height widget. Wire it into the layout prompt's height. |
| character_boxes | STRING | Numbers of the `character` boxes, such as `2, 5`, for MOSS-Image Layout Prompt's character_boxes input. Empty when there are none. |
| bounds | IMAGE_BOUNDS | One bounds row per box, for Bounded Image Crop, Bounds to Mask or Draw Image Bounds. |
| masks | MASK | One mask per box, white inside it, in box order. No boxes = one black mask the size of the frame. |