pypi ultralytics 8.4.125
v8.4.125 - Speed up initial model loading (#25883)

latest release: 8.4.126
13 hours ago

🌟 Summary

Ultralytics 8.4.125 makes YOLO26 model startup significantly faster—up to 46% faster in fresh Python processes—while improving dependency loading and documentation consistency. 🚀

📊 Key Changes

  • Faster initial model loading (PR #25883 by @pderrenger):
    • TorchVision transforms are now imported only when a checkpoint actually contains them.
    • Matplotlib is loaded only when semantic-training label plots are requested.
    • Restricted checkpoint loading is substantially faster while retaining compatibility with older PyTorch versions.
    • Official YOLO26n and YOLO26x checkpoints showed approximately 44–46% faster model loading on an Apple M5 Pro.
    • Restricted loading improved from 451 ms to 94 ms for YOLO26n and from 517 ms to 162 ms for YOLO26x.
    • The common from ultralytics import YOLO import also became faster, improving from 558 ms to 471 ms.
  • 🧪 Expanded loading validation:
    • Verified restricted loading across YOLO26 detection, classification, segmentation, pose, OBB, depth, and semantic checkpoints.
    • Confirmed multiple model types can be loaded sequentially in one process.
    • Tested compatibility with internal torch.nn checkpoint classes.
  • 📦 Package version updated from 8.4.124 to 8.4.125.
  • 🔗 Canonical Ultralytics URLs (PR #25879 by @pderrenger):
    • Removed trailing slashes from Ultralytics URLs across 136 files, including documentation, examples, source code, configuration, and workflow files.
    • Updated several outdated or redirected external links, including dataset, CUDA/cuDNN, MediaPipe, and PASCAL VOC references.

🎯 Purpose & Impact

  • 🚀 Faster startup for developers and applications: Model-based scripts, services, notebooks, and command-line workflows begin running sooner, especially in fresh Python processes.
  • 🪶 Lower unnecessary import overhead: Users who do not use semantic label plotting or serialized TorchVision transforms avoid loading those large optional dependencies.
  • 🛡️ Safer and more reliable checkpoint handling: The updated loading logic preserves restricted loading behavior while supporting a broad range of official YOLO26 tasks and checkpoint formats.
  • 🔄 Minimal migration impact: No major model architecture or training behavior changes are introduced; existing YOLO26 workflows should continue to work normally.
  • 🧭 Cleaner documentation navigation: Consistent URL formatting and refreshed external links should reduce redirects, improve link maintenance, and provide more reliable access to guides.

What's Changed

Full Changelog: v8.4.124...v8.4.125

Don't miss a new ultralytics release

NewReleases is sending notifications on new releases.