ComfyUI Ultralytics Integration – Midnight1111 Model Collection

For ComfyUI, here’s how to load these models:

  1. Locate your ComfyUI folder (e.g. ~/ComfyUI/ or C:\ComfyUI\).
  2. Create directories:
    cd /path/to/ComfyUI/models
    mkdir -p ultralytics/segm ultralytics/bbox
    
  3. Place your .pt files: • Segmentation → models/ultralytics/segm/ • Detection (bbox) → models/ultralytics/bbox/
  4. Restart ComfyUI
    cd /path/to/ComfyUI
    
  5. In the UI: Add Node → Model → Ultralytics → choose segm/… or bbox/…. Connect an Image Loader → Ultralytics node → Previewer

Unsafe files

Since getattr is classified as a dangerous pickle function, any segmentation model that uses it is classified as unsafe.

All models were created and saved using the official Ultralytics library, so it’s safe to use files downloaded from a trusted source.

See also: https://huggingface.co/docs/hub/security-pickle

Note on Loading Weights

If you encounter an error like:

Weights-only load failed. Unsupported global: builtins.set

This happens because PyTorch (for safety) blocks loading some objects by default. To fix it safely, add this code before loading:

python
import torch
torch.serialization.add_safe_globals([set])

This whitelists set and allows safe loading with weights_only=True.

Otherwise, never disable weights_only unless you 100% trust the file.

Check PyTorch's torch.load docs for more info.

Downloads last month
222
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for MidnightRunner/Ultralytics

Base model

Ultralytics/YOLO11
Finetuned
(49)
this model

Datasets used to train MidnightRunner/Ultralytics