pypi ultralytics 8.4.42
v8.4.42 - `ultralytics 8.4.42` Free tensors before OOM batch retry (#24360)

16 hours ago

🌟 Summary

Ultralytics v8.4.42 focuses on more reliable training under GPU memory pressure 🧠💪, plus several stability, security, export, and documentation improvements that make YOLO workflows smoother for both developers and end users.

📊 Key Changes

  • Top priority (current PR #24360 by @glenn-jocher): Better OOM recovery during training 🚀

    • When CUDA runs out of memory in early training, temporary tensors (batch, loss, preds) and trainer loss state are now explicitly cleared before retry.
    • Existing auto-batch retry behavior is preserved (no workflow changes for users).
  • Security hardening in downloads and path handling 🔐

    • Safer archive extraction now blocks unsafe zip/tar paths and risky members.
    • Safer URL/URI-derived file handling to prevent unsafe path traversal patterns.
    • Replaced unsafe parsing behavior in CUDA test logic and improved related safeguards.
  • Export pipeline refactor + reliability fixes 📦

    • Export dependency setup moved from central exporter into per-format modules (cleaner architecture, easier maintenance).
    • CoreML export now skips unnecessary proxy model loading to avoid export crashes on some Apple Silicon setups.
    • Added a new guide for exporting non-YOLO PyTorch models (timm/torchvision/custom) to multiple targets.
  • Backend usability improvement

    • Backends can now be called directly like model(x) instead of only model.forward(x).
  • Bug fixes affecting real workflows 🛠️

    • Fixed dataset/image loading when folder names contain square brackets (e.g. ./[data]/).
    • Fixed hyperparameter tuning checkpoint copying for multi-dataset runs.
    • Fixed plot_results() crash path when CSV plotting fails.
    • Added safety check for YOLOE head fusion when one2many branches are absent.
  • Platform and docs improvements 📚

    • Platform API docs now clearly document segmentation label payloads using segments (not polygon).
    • Jetson guide adds practical memory optimization tips (headless mode, service trimming, show=False, profiling).
    • Updated Axelera integration to stable SDK 1.6.0.
    • Broader docs cleanup: onboarding/order fixes, activity feed path fixes, updated tutorial videos, annotation links, and removed outdated API endpoints.

🎯 Purpose & Impact

  • Fewer failed training runs on limited VRAM 🎯
    The main v8.4.42 change helps training recover more reliably from first-epoch OOM events, reducing frustrating restarts.

  • Safer defaults for file and dataset handling 🛡️
    Security-focused path and extraction checks reduce risk when working with external files and archives.

  • More dependable exports across formats 🌍
    Export refactors and CoreML fixes improve cross-platform conversion stability, especially for deployment-heavy teams.

  • Better developer ergonomics 👩‍💻
    Callable backends, cleaner export internals, and bug fixes in tuning/plotting/path-loading improve everyday productivity.

  • Clearer onboarding and learning resources for all users 🙌
    Improved docs (including Ultralytics Platform guidance and Jetson memory tips) make setup and adoption easier for newcomers while still useful for advanced users.

What's Changed

New Contributors

Full Changelog: v8.4.41...v8.4.42

Don't miss a new ultralytics release

NewReleases is sending notifications on new releases.