pypi ultralytics 8.4.13
v8.4.13 - `ultralytics 8.4.13` Retry smaller batch on training CUDA OOM (#23590)

7 hours ago

๐ŸŒŸ Summary (single-line synopsis)

Ultralytics v8.4.13 makes training more resilient by automatically recovering from CUDA out-of-memory (OOM) errors during the first epoch by retrying with a smaller batch size ๐Ÿ”๐Ÿง ๐Ÿ”ฅ

๐Ÿ“Š Key Changes

  • Auto-retry on CUDA OOM during training (major change) ๐Ÿ”ฅ๐Ÿ› ๏ธ
    • If a CUDA OOM happens in the first epoch on single-GPU, Ultralytics will retry up to 3 times, halving the batch size each time (down to 1).
    • Training pipeline is rebuilt after batch reduction (dataloaders + optimizer + scheduler) to continue cleanly.
  • New internal training helper ๐Ÿงฉ
    • Adds a _build_train_pipeline() method to rebuild loaders/optimizer/scheduler when batch size changes (used by the new OOM recovery flow).
  • More reliable ONNX export for OBB + NMS ๐Ÿ“ฆโœ…
    • When exporting OBB (oriented bounding boxes) to ONNX with NMS enabled, simplify=True is now forced to avoid a known runtime issue (TopK-related error in some ONNX Runtime versions).
  • DGX system detection + TensorRT handling ๐Ÿ–ฅ๏ธโš™๏ธ
    • Adds is_dgx() detection and uses it (along with Jetson JetPack 7) to trigger a TensorRT version check/reinstall path for better export reliability on those systems.
  • Packaging stability fix: pin setuptools ๐Ÿงฐ๐Ÿ”’
    • Pins build requirements to setuptools<=81.0.0 to avoid breakages introduced by newer setuptools versions (notably affecting tensorflow.js export tooling).
  • Docs & examples refresh (YOLO26 messaging + tracking content) ๐Ÿ“š๐ŸŽฅ
    • Tracking docs now embed a newer multi-object tracking video featuring YOLO26 + BoT-SORT/ByteTrack.
    • Exporter docs/examples updated to show YOLO26 (yolo26n.pt) and mention ExecuTorch/Axelera export options (documentation signposting).
  • Example dependency update ๐Ÿ”„
    • Updates protobuf in the RT-DETR ONNX Runtime Python example.

๐ŸŽฏ Purpose & Impact

  • Fewer training crashes for everyday users ๐Ÿ™Œ๐Ÿ”ฅ
    • If you start training with a batch size thatโ€™s slightly too large for your GPU, Ultralytics can now self-correct and continue instead of failing immediatelyโ€”especially helpful for beginners and for โ€œfirst-epoch spikesโ€ in memory use.
  • Less manual trial-and-error ๐ŸŽฏ
    • Reduces the common loop of โ€œOOM โ†’ lower batch โ†’ restart training,โ€ saving time and frustration.
  • More dependable deployment exports ๐Ÿš€
    • ONNX exports for OBB models with embedded NMS should work more reliably out of the box, with fewer runtime surprises.
  • More predictable builds/CI ๐Ÿงฑ
    • Pinning setuptools helps prevent sudden packaging/tooling failures across environments.
  • Clearer guidance aligned with YOLO26 ๐Ÿงญ
    • Docs and examples increasingly steer users toward YOLO26 as the recommended model for training, tracking, and export workflows.

What's Changed

Full Changelog: v8.4.12...v8.4.13

Don't miss a new ultralytics release

NewReleases is sending notifications on new releases.