Ultralytics Visualization
Make those detections look like something
- results
- image
- IMAGE
Inference hands you a pile of numbers. This node turns them back into a picture you can actually look at. Give it the ULTRALYTICS_RESULTS and the original IMAGE from UltralyticsInference, and it runs Ultralytics' own plot() routine - the same annotated-image renderer the YOLO library uses for its demo outputs - and returns a new IMAGE with boxes, labels, masks and keypoints drawn on.
The inputs are mostly toggles, and they map almost one-to-one onto what Ultralytics' plotter can draw: labels (class names on boxes), boxes (the rectangles), masks (segmentation overlays, when the model produced them), probs (class probabilities), kpt_line (pose skeleton lines), plus line_width and font_size for cosmetics. color_mode is the fun one: class colors every dog the same way, instance gives each individual object its own color - worth flipping to instance the moment you're tracking several objects and want to tell them apart at a glance.
There's one genuine gotcha in here: the sam boolean looks like it summons the Segment Anything Model, but it doesn't. Reading the source, sam=True (the default) renders the annotation on the CPU path while sam=False switches to Ultralytics' im_gpu=True fast path. The name is a leftover, and its effect is a rendering-path switch, not a segmentation model - the actual mask overlay comes from the masks toggle plus whatever your model detected. Leave it on the default and don't go hunting for a SAM checkpoint because of it.
This is the output node for the pack's whole detection story. Wire the annotated image to a preview, save it, or pass it onward; the natural flow is Loader → Inference → this, and it reads like the demo screenshots in the README, with detection, segmentation and pose all drawn the same way.
Install: ComfyUI Manager, search "ComfyUI-YOLO", or git clone https://github.com/kadirnar/ComfyUI-YOLO into custom_nodes (the README's custom/nodes is a typo), restart, and let it install ultralytics>=8.2.27. If you wire it up and see a blank image, check that labels and boxes are actually on, and remember that the detections live on the ULTRALYTICS_RESULTS output of inference - not the IMAGE passthrough, which is the original un-annotated image. That last one trips people up more than you'd think.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| results | ULTRALYTICS_RESULTS | — | |
| image | IMAGE | — | |
| line_width | INT | 3 | — |
| font_size | INT | 1 | — |
| sam | BOOLEAN | true | — |
| kpt_line | BOOLEAN | true | — |
| labels | BOOLEAN | true | — |
| boxes | BOOLEAN | true | — |
| masks | BOOLEAN | true | — |
| probs | BOOLEAN | true | — |
| color_mode | COMBO | class | 2 options: class, instance |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |