Canvas BBox
The bbox annotation canvas
- width
- height
- bbox_1
- bbox_2
- bbox_3
- bbox_4
- bbox_5
- bbox_6
- bbox_7
- bbox_8
- bbox_9
- bbox_10
Bounding boxes are everywhere in ComfyUI workflows - FaceDetailer wants one, regional conditioning wants them, detection nodes emit them - but there's no stock way to just draw a few rectangles on a canvas and read the coordinates out. Canvas BBox is a tiny drawing canvas for exactly that: you set the canvas size, drag rectangles onto it, and it hands you each rectangle as an x,y,width,height string plus the canvas dimensions.
The author credits Smirnov75's ComfyUI-mxToolkit as the base, and it shows in the best way: this is a widget, not a workflow. Set canvas_width and canvas_height (64–4096), draw on the node face, done.
How it works
The rectangles serialize into bbox_data as x,y,w,h;x,y,w,h;.... On run, the node parses up to ten of them and pads the rest with empty strings. That's the whole mechanism - no torch, no model, just string parsing. The width and height outputs simply echo your canvas size.
Outputs: width, height, and bbox_1 through bbox_10 (ten STRING slots). Each bbox_N is the exact x,y,w,h text you'd feed into any node that consumes that format - or into this pack's own BBox Bridge if your target speaks a different dialect.
Why you'd reach for it
Three honest use cases: debugging (see exactly what a detector thinks a region is), setting up regional conditioning by hand, and annotating for an external tool. It's also a decent way to prototype bbox layouts before you trust them to an automated detector. Ten slots is the ceiling, so don't plan a 40-region face detail pass around it.
One thing to remember: unused slots come out as "". Downstream nodes that naively parse an empty string will choke - filter empties before feeding them anywhere strict.
Installing
Same pack, same steps as everything in ComfyUI-YCNodes_Toolkit:
cd ComfyUI/custom_nodes
git clone https://github.com/yichengup/ComfyUI-YCNodes_Toolkit
Restart, and you'll find it under the YCNodes Toolkit category. Only numpy and Pillow are required - no models, no heavy deps. If you're already running the pack for Load Image Crop Expand, this node just shows up.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| canvas_width | INT | 51264–4096 | — |
| canvas_height | INT | 51264–4096 | — |
| bbox_data | STRING | — |
Outputs (12)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |
| bbox_1 | STRING | — |
| bbox_2 | STRING | — |
| bbox_3 | STRING | — |
| bbox_4 | STRING | — |
| bbox_5 | STRING | — |
| bbox_6 | STRING | — |
| bbox_7 | STRING | — |
| bbox_8 | STRING | — |
| bbox_9 | STRING | — |
| bbox_10 | STRING | — |