Render VLM Detections
See what your detector actually found
- image
- detections
- overlay
The first thing you do after running a detector is the same thing every time: look at the image and ask "did it get it right?" If you're squinting at a JSON string of boxes to answer that, you're wasting minutes per run. Render VLM Detections draws the answer on the image - boxes, mask fills, and labels, deterministically colored, ready to eyeball or save.
It's the visual check node in gokayfem's VLM_nodes pack. It takes an image and a VLM_DETECTIONS socket, and returns a single overlay IMAGE with everything drawn. That's the whole contract, and it's the node you want between "detect" and "believe."
How it works
Each detection gets a deterministic color (the pack has a stable color scheme for this, so the same label always renders the same color - no flicker between frames). You control what gets drawn with two booleans: draw_masks fills each detection's mask or box region with a translucent tint, and draw_labels writes the label on top. mask_opacity (default 0.35) sets the fill strength, and line_width (default 3) sets the box stroke.
The overlay comes out at the source resolution of the image you fed in, so you can save it, compare it, or run it through a preview node. For video, feed the matching frame batch and you get the whole annotated clip.
Inputs and outputs
- image (IMAGE) - the frames the detections describe.
- detections (
VLM_DETECTIONS) - what to draw. - draw_masks / draw_labels - toggle fills and text.
- mask_opacity / line_width - visual tuning.
Output: overlay (IMAGE).
Installing this pack
Same one-pack install as the rest. ComfyUI Manager: search VLM_nodes. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/gokayfem/ComfyUI_VLM_nodes
cd ComfyUI_VLM_nodes
python -m pip install -r requirements.txt
Run pip with ComfyUI's Python. No model downloads - pure drawing.
Common issues
The coordinate-space rule applies here harder than anywhere, because the mismatch is immediately visible: if your detections came from a downscaled analysis copy but you render onto the full-res original, the boxes land in the wrong place - offset, scaled, or both. Feed this node the same image the detections were computed on, or you'll be convinced your detector is broken when it isn't. Also, draw_masks on detection rectangles draws rectangles, not object contours; if the boxes look crudely aligned to the subject, that's the detection format showing, not a render bug - swap in polygon or SAM2.1 masks upstream for a tighter visual.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| detections | VLM_DETECTIONS | — | |
| draw_masks | BOOLEAN | true | — |
| draw_labels | BOOLEAN | true | — |
| mask_opacity | FLOAT | 0.350–1 | — |
| line_width | INT | 31–32 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| overlay | IMAGE | — |