Nodes/ComfyUI-CVOverlay/CV Model Loader
ComfyUI Node

CV Model Loader

The node that downloads its own YOLO weights

By joosthel·Created about a year ago·Updated about a year ago· 5
CV Model Loader
    • model
    model_nameyolov8n.pt
    custom_model_path

    This node is the front door to the CVOverlay pack, and honestly it's the least interesting part of it - which is exactly why it exists. It's a thin wrapper around Ultralytics' YOLO loader that solves the two things people always trip over: getting the model file into the right folder, and getting a usable model object out the other side. You pick a model, it downloads on first use, and you're done.

    What it does

    Pick one of the five stock YOLOv8 weights from the model_name dropdown and it handles the rest. On first use it downloads the weight file into ComfyUI/models/yolo/ (it uses ComfyUI's own models directory via folder_paths, so this is the right place, not the random folder ultralytics would default to) and loads it. On every run after that it just loads the file that's already there - no re-download.

    The dropdown is the standard ultralytics lineup:

    • yolov8n.pt (default) - nano, ~6 MB, fast enough for CPU
    • yolov8s.pt, yolov8m.pt, yolov8l.pt, yolov8x.pt - progressively bigger, slower, more accurate

    For drawing overlays on footage, n or s is usually plenty. You're making a visual effect, not winning an accuracy benchmark. Reach for x if you're chasing small or distant objects.

    There's one optional input worth knowing about: custom_model_path. Leave it blank unless you've trained or fine-tuned your own .pt file (say, a model that detects your specific objects). Give it the path and it loads that instead of the dropdown weights.

    Wiring it up

    The single output, model (type CV_MODEL), goes into the only consumer in the pack: CV Object Detector. Nothing else accepts it. That's the whole pipeline:

    CV Model Loader → CV Object Detector → CV Aesthetic Overlay
    

    Installing

    Same story as the rest of the pack - it's four nodes, MIT-licensed, by Joost Helfers, and there's no community chatter about it yet, so treat it as a small experimental tool rather than a battle-tested ecosystem staple. Install via ComfyUI Manager (search "ComfyUI-CVOverlay"), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/joosthel/ComfyUI-CVOverlay.git
    

    Restart ComfyUI. The requirements are the heavy part: torch, torchvision, ultralytics, opencv-python, numpy, scipy, Pillow. Your ComfyUI already has torch, so the real new dependency is ultralytics - which pulls in a fair amount on its own. If the environment is a fresh install, dependencies are supposed to install automatically; on Windows portable setups that frequently doesn't happen.

    Troubleshooting

    • "Missing dependencies" error on load. The node raises this explicitly when ultralytics isn't importable. Fix: pip install ultralytics (plus opencv-python scipy if they're also missing) into the same Python environment ComfyUI runs from. This is the single most common failure across YOLO nodes generally - the No module named 'ultralytics' error shows up all over the subreddit, and the fix is always a manual pip install.
    • First run stalls / seems to hang. It's downloading. yolov8n.pt is ~6 MB but slower connections or the GitHub-hosted weights can make it look frozen. Watch the console for the download messages.
    • Where did my model go? ComfyUI/models/yolo/. If you already have YOLO weights from Impact Pack or similar, you can copy your own .pt in there and it'll pick it up.

    If you don't actually need a model - because you're only doing blob tracking on bright spots - you can skip this node entirely. That's the nice thing about the pack: the tracker half doesn't need YOLO at all.

    CategoryCV/Models

    Inputs (2)

    NameTypeDefaultDescription
    model_nameCOMBOyolov8n.pt5 options: yolov8n.pt, yolov8s.pt, yolov8m.pt, yolov8l.pt, yolov8x.pt
    custom_model_pathoptSTRING

    Outputs (1)

    NameTypeDescription
    modelCV_MODEL