Show BBoxes
The node that makes your detector's output real
- image
- bboxes
- image
You've built the anchor boxes, decoded the offsets, run the NMS - and at the end of it all you have a tensor of coordinates and zero idea whether your detector actually found the dog. CdlShowBboxes is the payoff node: it draws the boxes on the image so you can see, with your own eyes, whether the thing works. In a pack that's all about understanding deep learning, this is the node that turns object detection from abstract tensors into "oh, it's doing that."
It's ComfyDL's port of the d2l show_bboxes visualization, and it's the natural end of the detection chain: Multibox Prior → target/offset → inference → NMS → Show BBoxes. Renders up to 200 boxes per call, with labels and colors.
The inputs
image- the background image, a standard ComfyUI IMAGE ([B, H, W, C]; the first image in the batch is used).bboxes-[N, 4]corner-format boxes(x1, y1, x2, y2). Critical: coordinates must be normalized to [0, 1] relative to the image. If your boxes are in raw pixels, they'll fly off the plot or draw a single pixel in a corner.labels- comma-separated box labels (optional). One per box; leave empty for unlabeled boxes.colors- comma-separated matplotlib colors (default"b,g,r,m,c"), cycled per box.
Output: image - the annotated [1, H, W, C] IMAGE, ready for Preview/Save or further processing.
Installing ComfyDL
Standard for this pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Cynthia-lxx/ComfyDL
cd ComfyDL && pip install -r requirements.txt
Restart ComfyUI; it's under ComfyDL → Visualization, or search "ComfyDL" in ComfyUI Manager. Only dependency is matplotlib; no model downloads.
The gotchas that'll bite you
Normalized coordinates, full stop. The single most common failure here: pixel-space boxes in a normalized-coordinate node. Everything upstream in ComfyDL's detection chain works in normalized [0,1] space - anchors from Multibox Prior are normalized by design - so as long as you keep the chain self-contained, you're fine. The moment you hand-box a coordinate in pixels, it breaks.
Second: the 200-box cap. If your NMS threshold is too permissive and you feed thousands of boxes, the node silently renders the first 200 and the rest just... don't appear. Not an error - a limit. It's a visualization guard, and it'll confuse you exactly once before you remember it.
Also worth knowing: this node draws on the image and outputs an IMAGE, unlike the pack's private cdlTensor nodes. That makes it a clean bridge - annotated output can flow into stock ComfyUI nodes if you ever need it. But the boxes/labels you pass in are cdlTensors and comma-separated strings respectively, so keep those inside the ComfyDL sandbox.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| bboxes | TENSOR | — | |
| labelsopt | STRING | — | |
| colorsopt | STRING | b,g,r,m,c | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |