Nodes/Vantage-NodesV2/Vantage-Bounding-Boxes
ComfyUI Node

Vantage-Bounding-Boxes

Draw the boxes, get the numbers, feed the model

By vantagewithai·Created 15 days ago·Updated 11 days ago· 3
Vantage-Bounding-Boxes
  • bboxes
  • preview
  • bboxes
  • elements
  • image
  • width
  • height
  • characters
◄resizefalse►
◄aspect_ratio▾►
◄megapixels1.0►
◄multiple8►
◄editor_state[]►
◄last_incoming[]►
◄background_image▾►
◄resize_options{}►
◄background_state{}►

Layout control is the thing people keep trying to get out of prompt text and keep failing at. The whole reason box-drawing nodes exploded in mid-2026 is that a wave of models - Ideogram 4 most visibly - want boxes as actual numbers, and the usual way to produce those numbers was to talk a language model into it. The KB records the relief when a UI appeared: Kijai's Ideogram 4 Prompt Builder "rocks. you can make boxes on the canvas and 100 percent control the compotation" (+747). This node is the same idea, packaged as a general-purpose region editor.

What it is

An interactive canvas inside a node. Load a background image or start from a blank 1024×1024 canvas, draw boxes, tag each as Object or Text, give it content and a description, and the node outputs proper bounding-box data rather than a string you have to parse.

Drag on empty canvas to draw (Shift-drag over an existing box), drag inside to move, drag handles to resize, or type exact x, y, width, height in the inspector. Duplicate/delete, ordering arrows so background regions sit ahead of foreground ones, a grid toggle, undo/redo covering region edits and resize settings. Keyboard: B/V draw/select, Delete, Ctrl/Cmd+Z and Shift+Z, Ctrl/Cmd+D, arrows to nudge 1px (Shift for 10), Escape to deselect.

The inputs that matter

background_image is the picker - searchable, subfolder-aware, (none) for a blank canvas. Dropping a local file uploads it and selects it, using ComfyUI's standard upload semantics. Loaded images keep their original dimensions including EXIF orientation.

resize is the master switch for the size controls. With it on, aspect_ratio (eight presets from 1:1 to 21:9), megapixels (0.1–16, where 1 MP means 1024×1024) and multiple (8–128, step 4) drive ComfyUI's ResolutionSelector calculation - the same maths the core resolution nodes use, so your numbers line up with the rest of your workflow. The Resize… dialog behind resize_options adds interpolation (nearest-exact through lanczos), aspect mode (pad is the default, plus stretch/resize/crop/pillarbox_blur/total_pixels and edge variants), crop/pad position and pad colour. Apply processes the image and transforms existing boxes with it; disabling resize snaps you back to the original dimensions.

The optional bboxes input accepts bounding boxes, elements, or a JSON string, which is how you seed the editor from something upstream. Run once to initialise incoming regions; a changed upstream value replaces the editor contents, while your local edits win until the upstream changes again. The rest - editor_state, last_incoming, background_state - are the node's saved state. Leave them alone.

Outputs

preview is the annotated image, boxes and all. image is the clean background with no annotations and no dimming (black canvas if nothing is loaded). bboxes is BOUNDING_BOX in pixel coordinates, elements is the same regions in ComfyUI's bounding-box helper format for the core crop/paste/region nodes. width and height are the applied image's dimensions - wire those into the multi-image loader when you want everything downstream sized to the composition you drew. characters is a comma-separated list of one-based box numbers marked Character (2,4,6), empty when none are, and text boxes are excluded.

Where it fits

Two genuinely different jobs. First, layout conditioning for models that take boxes - the JSON-schema crowd, where the box is the prompt. Second, regional work: draw the region you care about, build a mask or crop from it, stop hand-guessing coordinates. The KB's detection notes are a decent reality check here - detector boxes wrap the cup and not the saucer, so a hand-drawn box usually wants padding before you inpaint inside it. The width/height pair is a free side effect: a shared output resolution, set by drawing on a canvas.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/vantagewithai/Vantage-NodesV2.git

Restart ComfyUI, hard-refresh the browser, and search "Bounding". ComfyUI Manager should also list Vantage-NodesV2; the clone is the documented route.

No pip install - no requirements file, no declared dependencies. But this is the one node in the pack with a hard upstream requirement: a recent ComfyUI that ships comfy_extras/nodes_bounding_boxes.py and comfy_extras/nodes_resolution.py, plus graph expansion and lazy evaluation. Missing those modules is the classic "node won't load" cause here, and the fix is updating ComfyUI, not reinstalling the pack.

Troubleshooting

Node won't appear or errors on import. Missing bounding-box or resolution module - update ComfyUI.

Boxes empty after wiring bboxes. Run once; incoming regions initialise on the first execution.

Picker doesn't show a file you just added. Press R / Refresh Node Definitions.

Exported boxes don't match what you see. Check whether Resize is enabled: the read-only dimensions under the grid always describe the applied image, and boxes are in that coordinate space. Disabling Resize restores original dimensions - and transforms your boxes back with it.

CategoryVantage/Image

Inputs (10)

NameTypeDefaultDescription
resizeBOOLEANfalse—
aspect_ratioCOMBO8 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +2
megapixelsFLOAT1.00.1–16—
multipleINT88–128—
editor_stateSTRING[]—
last_incomingSTRING[]—
background_imageCOMBO2 options: (none), example.png
resize_optionsSTRING{}—
background_stateSTRING{}—
bboxesoptBOUNDING_BOX,ARRAY,STRING—

Outputs (7)

NameTypeDescription
previewIMAGE—
bboxesBOUNDING_BOX—
elementsARRAY—
imageIMAGE—
widthINT—
heightINT—
charactersSTRING—