Nodes/Jags_VectorMagic/Jags-YoloSEGdetectionNode
ComfyUI Node

Jags-YoloSEGdetectionNode

Run YOLOv8 and get the annotated picture back — boxes drawn on

By jags111·Created 3 years ago·Updated about a year ago· 89
Jags-YoloSEGdetectionNode
  • image
  • SEG_IMAGE
model_name

Jags-YoloSEGdetectionNode is the "what does this model actually see?" node. It runs an Ultralytics YOLOv8 model on your image, draws the detection boxes, labels, and confidence scores onto it, and hands you back the annotated picture. No mask, no class filtering, no clever output - just a look at the detection results in image form.

That makes it a utility rather than a workflow centerpiece. You reach for it when you want to sanity-check a model, inspect what a detection finds in a photo, or build an annotated image for a dataset. If your actual goal is a mask - "give me every person as a selection" - that's the sibling YoloSegNode's job, not this one's.

How it works

The mechanism is short and honest. It loads the YOLO model from your models/yolov8 folder, runs inference on your image, and calls Ultralytics' results[0].plot() to render the annotated frame - bounding boxes, class labels, confidence - then converts that to an RGB tensor. That's the entire node. One image in, one annotated image out, with the model doing all the real work.

Inputs

  • image (required, IMAGE) - the image to run detection on. Note the code squeezes the batch dimension, so this is a single-image node; don't feed it a batch and expect per-image results.
  • model_name (required) - a dropdown that auto-populates from the .pt/.engine files in your ComfyUI/models/yolov8/ folder. It looks empty until you put models there - that's normal.

There are no confidence or class filters. Everything the model detects gets drawn, at whatever the model's own confidence threshold is.

Output is SEG_IMAGE (IMAGE) - the annotated picture.

Getting the models

The README sends you to two places:

  • Detection models - the official Ultralytics weights, e.g. yolov8m.pt from the YOLOv8 detect docs.
  • The author's collection - jags/yolov8_model_segmentation-set on HuggingFace, which bundles seg, detect, and face-detection weights in one place.

Drop whatever you want to try into the models folder:

mkdir -p ComfyUI/models/yolov8
# then drop yolov8m.pt (or any .pt) in there and restart ComfyUI

One casing gotcha: the README writes the folder as models/Yolov8, but the code reads folder_paths.models_dir/yolov8 - lowercase. On Windows the filesystem ignores the case and it works anyway; on Linux an uppercase folder means the dropdown stays empty. Use lowercase yolov8.

The pack installs ultralytics from its requirements, so the YOLO runtime itself should be present after a Manager install.

Installing the node

ComfyUI Manager → search Jags_VectorMagic → install → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/jags111/ComfyUI_Jags_VectorMagic

Heads-up: the pack pulls a heavy requirements list (ultralytics, librosa, clip-interrogator, opencv-python, …) whether you use one node or all of them.

Gotchas

  • This is not a masking node. The name says "SEG" but you get the annotated image, not a mask - the code's mask extraction is literally a commented-out TODO. If you expected a mask, swap to YoloSegNode.
  • Detection models only. This node works with plain detect weights (yolov8m.pt). A -seg model works too, but you'd be wasting the segmentation head - see YoloSegNode for where that head actually gets used.
  • It reloads the model every run. Each execution loads the .pt from disk, so the first run after changing model_name is slow. Fine for inspection, annoying if you're looping.

When you just need to see what a YOLO model finds - and you don't care about the mask yet - this is the quick, no-config answer.

CategoryJags_vector/yoloSEG

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
model_nameCOMBO0 options:

Outputs (1)

NameTypeDescription
SEG_IMAGEIMAGE