Bbox Visualize
Draw detection boxes onto your image
- images
- bboxes
- images
When you run a detector, a YOLO model, a face detector, whatever's producing bounding boxes, you get back a BBOX: a list of coordinates. Coordinates are invisible. You have no idea whether the detector actually found the face, missed it, or boxed the lamp in the background until you draw those boxes onto the picture. That's this node's entire reason for existing. It takes your image and your boxes and outlines them, so you can see what the detector saw.
It's a debug and inspection node from kijai's KJNodes, the utility pack most people already run. You'll reach for it any time a detection-driven workflow, cropping, per-region inpainting, ADetailer-style pipelines, isn't landing where you expect and you need to check the boxes before blaming the sampler.
How it works
You pass in an image (or a batch of images) and the BBOX from your detector, and it renders each box as an outline on top. The one gotcha that trips people up is coordinate format, which is why there's an explicit switch for it.
The inputs and outputs that matter
images- the image or batch to draw on.bboxes- theBBOXoutput from a detector node. This is the data being visualized.bbox_format(defaultxywh) - this is the setting that actually matters. Detectors disagree on how they encode a box.xywhmeans x, y, width, height (top-left corner plus size);xyxymeans x1, y1, x2, y2 (two opposite corners). If your boxes come out in the wrong place, tiny, huge, or shifted off into a corner, this is almost always the culprit. Match it to whatever your detector emits.line_width(default 1, range 1–10) - outline thickness in pixels. Bump it up on large images or the lines vanish into the detail.
The output is images, the same picture(s) with the boxes drawn on. It's a visualization, not a crop or a mask, so it's for looking at, not for feeding into a cropping node.
Installing it
You likely have KJNodes already. Otherwise: ComfyUI Manager → search KJNodes for ComfyUI → install → restart. By hand:
cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-KJNodes
pip install -r ComfyUI-KJNodes/requirements.txt
Restart ComfyUI. No models or heavy dependencies for this one; it just draws rectangles.
Common issues
Boxes are in the wrong spot, wrong size, or off the edge. Flip bbox_format. This is the number-one problem with box visualization: your detector emits xyxy and you're feeding it as xywh (or the reverse), so the width/height get read as absolute coordinates and everything goes sideways. Try the other format first, before anything else.
Lines are too thin to see. Raise line_width. On a 1024px-plus image a 1px line is nearly invisible; 3–5 reads much better.
No boxes appear. Your detector returned an empty BBOX, meaning it found nothing. That's a signal, not a bug: the visualization is telling you the detection stage came up empty, so go tune the detector's threshold or confidence rather than debugging this node.
A batch only shows boxes on one frame. Make sure the box data actually corresponds to the images you're passing. Boxes are matched to the frames they were detected on, so a mismatch between the image batch and the bbox source will leave frames un-annotated.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| bboxes | BBOX | — | |
| line_width | INT | 11–10 | — |
| bbox_format | COMBO | xywh | 2 options: xywh, xyxy |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |