ComfyUI Node

Bbox Converter

Convert between a layout JSON and bounding boxes. Outputs the layout JSON (percent boxes when converting bboxes), pixel bounding boxes and Create Bounding Boxes elements.

By FranckyB·Created about a year ago·Updated about 12 hours ago· 172
Bbox Converter
  • bboxes
  • layout_json
  • bboxes
  • elements
◄width1024►
◄height1024►
◄use_bboxesfalse►
◄layout_json—►
CategoryPrompt Manager

Inputs (5)

NameTypeDefaultDescription
widthINT102416–16384Canvas size the pixel boxes refer to, e.g. the layout builder's width/height outputs.
heightINT102416–16384Canvas size the pixel boxes refer to, e.g. the layout builder's width/height outputs.
use_bboxesBOOLEANfalseInput to convert when both are connected (shown only then).
layout_jsonoptSTRINGLayout JSON (MOSS-native, percent or 0-1000 boxes), an Ideogram 4 caption or Krea 2 grounding lines. Passed through to the layout_json output.
bboxesoptBOUNDING_BOX,ARRAY,STRINGBounding boxes, Create Bounding Boxes elements, or their JSON.

Outputs (3)

NameTypeDescription
layout_jsonSTRING—
bboxesBOUNDING_BOX—
elementsARRAY—