Load Yolov8 Model
The YOLO loader that fetches its own weights, so you don't have to
- YOLOV8_MODEL
The first node in any Comfyui-Yolov8-JSON graph, and mercifully the boring one. Load Yolov8 Model is a dropdown that picks a YOLOv8 checkpoint and hands a YOLOV8_MODEL to the Apply nodes. The feature that earns it a page of its own: it downloads the weights for you.
That's rarer in ComfyUI than you'd think. Half the custom-node tutorials start with "now go to this HuggingFace page and drop three files in the right folder," which is where workflows die. This node skips all of it - you pick a name from a dropdown and the file lands in ComfyUI/models/yolov8/ on its own, pulled from the official Ultralytics release assets (v8.1.0 on GitHub) the first time you run.
The dropdown
Ten choices, five detection and five segmentation:
| Detect | Seg | |---|---| | yolov8n (6.2 MB) | yolov8n-seg (6.7 MB) | | yolov8s (21.5 MB) | yolov8s-seg (22.8 MB) | | yolov8m (49.7 MB) | yolov8m-seg (52.4 MB) | | yolov8l (83.7 MB) | yolov8l-seg (88.1 MB) | | yolov8x (130.5 MB) | yolov8x-seg (137.4 MB) |
The naming convention is size-first: n (nano) is the fast-and-light one, s small, m medium, l large, x the big slow accuracy champ. The model names are the standard COCO-trained 80-class weights. Rule of thumb: start with yolov8n or yolov8s to make sure your pipeline works, then step up if you're not happy with the detections. On a modern GPU the nano model is nearly instant; the -x weights will make you feel the difference.
One decision actually matters: if your graph uses Apply Yolov8 Model Seg, you must pick a -seg weight. Segmentation needs the mask-head variant of the model - feed the Seg node a plain detection checkpoint and it'll fail on result.masks. The regular Apply Yolov8 Model happily takes either, but there's no point loading the bigger -seg file for detection-only work.
Loading, and the one real failure mode
Under the hood it constructs an ultralytics.YOLO object from the checkpoint path - nothing exotic, just the official Python package doing its thing. Which brings up the only genuinely common problem with this pack: No module named 'ultralytics'. It shows up mostly on Windows portable installs where ComfyUI Manager's dependency install silently didn't happen. Fix:
# on a portable install, use the embedded python
cd ComfyUI
python_embeded\python.exe -m pip install ultralytics
That's also the dependency worth a quiet nod: Ultralytics is AGPL-licensed, and per Ultralytics' own licensing page that license reaches the model weights, not just the code. Fine for personal use and hobby projects; a thing to think about before you ship a commercial product around it. And if you've been around since late 2024, you remember the compromised Ultralytics release that shipped a cryptominer into ComfyUI setups through Impact Pack - that was a supply-chain issue that got patched quickly, but it's the reason "don't install random versions of ultralytics" is still sensible advice. The pack's own dependency install runs on every ComfyUI start, which keeps you near current.
Install
ComfyUI Manager → search Comfyui-Yolov8-JSON → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/prodogape/Comfyui-Yolov8-JSON
Restart and you're done. If you already have the weights and want to point at a specific file instead of the dropdown, that's what Load Yolov8 Model From Path is for.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | 10 options: yolov8n(6.23MB), yolov8s(21.53MB), yolov8m (49.70MB), yolov8l (83.70MB), yolov8x (130.53), yolov8n-seg (6.73MB), +4 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| YOLOV8_MODEL | YOLOV8_MODEL | — |