YOLO Classify
It answers one question — 'what is this?' — and that's enough
- yolo_classifier_model
- image_to_classify
- Class name with highest score
The whole job, in one output
YOLO Classify is the business end of the two-node ComfyUI_YOLO_Classifiers pack. You feed it an image and a loaded YOLO classifier model, and it hands back exactly one thing: a string - the class name the model is most confident the whole image belongs to. "goldfish." "sports car." "labrador retriever." No bounding box, no mask, no confidence percentage, no second opinion. The output socket even tells you what to expect: "Class name with highest score."
That reads as underwhelming until you want a workflow that makes decisions. This is the cheap "vibe check" node: after you generate, you can ask it whether what came out is actually a cat before you spend a full hi-res pass on it. Wire the string into a text condition or a switch/comparison node and you've got routing - different post-processing per subject, or filter out anything that doesn't match. It's also the classification sibling of the YOLO detection you may already know from ADetailer and friends; the difference is the job. Detection says where a face is. Classification says what the entire image is. Don't confuse the two.
The honest caveat: the bundled models are ImageNet classifiers, so the vocabulary is "Egyptian cat" and "traffic light," not "this face is blurry." Great for automation, useless for aesthetic judgment.
How it works
Under the hood it's almost embarrassingly simple, which is nice because you can trust it. It takes the image tensor, permutes it from ComfyUI's (B, H, W, C) layout to (B, C, H, W), casts it to fp16, resizes to a fixed 224×224, and hands it to the Ultralytics YOLO model you loaded. Then it reads r.probs.top1 and returns r.names[top1] - the top-1 prediction's label. That's the whole mechanism: one forward pass through a tiny CNN, one string out. It calls no API and needs no key; everything runs locally.
The inputs that matter
Only two things to set, and both are wires rather than widgets:
- yolo_classifier_model - the
YOLO_CLASSIFIER_MODELhandle from this pack's model loader. It's required, and no other node produces that type, so the loader always comes first. - image_to_classify - any IMAGE. It'll be squashed to 224×224 either way, so don't overthink resolution.
The single output, "Class name with highest score" (STRING), is what you feed into your routing or text logic.
Installing it
Nothing exotic. In ComfyUI Manager, search "YOLO Classifiers" (pack title: ComfyUI_YOLO_Classifiers) and install. Or clone it manually:
cd ComfyUI/custom_nodes
git clone https://github.com/SuperMasterBlasterLaser/ComfyUI_YOLO_Classifiers
then restart ComfyUI. The pack pins ultralytics==8.2.32, so expect a pip step on first launch. What Manager will not do is fetch the model weights - see below.
Common issues
- "The loader has no models." The loader only reads what's in the folder; it never downloads. Grab
yolov8n-cls.ptfrom the Ultralytics classify docs and drop it intoComfyUI/models/ultralytics/classifiers/. The nano (~5 MB) is plenty to start. - You grabbed the wrong weights. A detection model (
yolov8n.pt, no-cls) loads fine but crashes this node with an attribute error, because it has nor.probs. Only the-clsvariants work. - It's a single-image node. The code squeezes the batch dimension; feed it one image at a time, not a batch.
- fp16 only. The half-precision cast assumes a GPU. On a CPU-only box it technically runs, but slowly.
- Licensing. Ultralytics is AGPL-3.0, the same copyleft that follows the whole YOLO ecosystem around. Fine for personal use; read up before shipping anything commercial.
It's a niche, one-trick pack - the repo has no README and about one star, so the hand-holding stops here. But for a cheap local yes/no check on what your workflow just produced, this is one of the simplest paths in ComfyUI.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| yolo_classifier_model | YOLO_CLASSIFIER_MODEL | — | |
| image_to_classify | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Class name with highest score | STRING | — |