New Release: Ultralytics v8.4.87

:rocket: Ultralytics v8.4.87 is Here!

Ultralytics v8.4.87 delivers a cleaner, safer GPU device-selection system, plus stability and performance improvements across training, inference, tracking, exports, and dataset checks. This release is especially helpful for users running Ultralytics YOLO in notebooks, services, CI, distributed training, production systems, and multi-GPU environments.

You can explore the full release on the Ultralytics v8.4.87 GitHub release page. :tada:


:glowing_star: Quick Overview

This release focuses on:

  • :compass: More predictable CUDA device selection
  • :test_tube: Stronger nonzero-GPU training validation
  • :broom: Cleaner DataLoader worker shutdowns
  • :high_voltage: Faster post-warmup inference paths
  • :floppy_disk: More accurate dataset storage-speed warnings
  • :bullseye: Better ReID tracking device consistency
  • :package: More reliable export dependency and device handling

:compass: New Device Selection System

Ultralytics v8.4.87 introduces a clean-sheet CUDA device-selection flow designed to avoid surprising behavior in long-running Python processes.

Key updates include:

  • Added parse_device() to normalize device inputs like cuda:0, 0,1, lists, tuples, torch.device, and -1 idle-GPU auto-selection.
  • Updated select_device() so it no longer mutates CUDA_VISIBLE_DEVICES.
  • Explicit single-GPU requests now use torch.cuda.set_device() instead of environment-variable remapping.
  • Trainer, DDP setup, validation, autobatch, and distributed barriers now consistently use resolved CUDA device indices.
  • Added documentation for ultralytics.utils.torch_utils.parse_device.

This work was introduced by @glenn-jocher in PR #25021. :raising_hands:


:test_tube: Stronger Multi-GPU Training Tests

This release adds a cold-process nonzero-GPU training test to better match real CLI and Ultralytics Platform training behavior.

The new test verifies that training on GPUs like device=1 or higher works correctly from a fresh process, without relying on previous CUDA initialization.

This improvement was added by @glenn-jocher in PR #25019. :desktop_computer:


:broom: Cleaner Training Shutdowns

Ultralytics v8.4.87 fixes noisy DataLoader worker shutdown behavior at the end of training.

Highlights:

  • Added a close() method to InfiniteDataLoader.
  • Training now explicitly shuts down persistent train and validation workers before Python exits.
  • This helps prevent end-of-run DataLoader worker ... killed by signal: Terminated errors after results are already saved.

Thanks to @Bovey0809 for this fix in PR #25024. :white_check_mark:


:high_voltage: Improved Inference Warmup

AutoBackend.warmup() now preloads torchvision for non-end-to-end models, helping standard NMS workflows use faster torchvision NMS when appropriate.

This can reduce first-inference latency after warmup and make detection pipelines feel smoother in production and interactive workflows.

Thanks to @Y-T-G for the improvement in PR #25023. :rocket:


:floppy_disk: More Accurate Dataset Speed Checks

This release fixes an inverted condition in check_file_speeds().

Slow storage, including network-mounted datasets, should now trigger the intended warning instead of being incorrectly reported as β€œFast image access :white_check_mark:”.

Thanks to @ahmet-f-gumustas for the fix in PR #25025. :bar_chart:


:bullseye: Tracking and ReID Device Alignment

Trackers now pass the predictor device into ReID encoders, so ReID models are initialized and run on the same device as prediction where applicable.

This improves consistency for tracking workflows, especially when working across CPU, CUDA, and multi-GPU configurations.


:package: Export Reliability Improvements

v8.4.87 also improves export behavior across several backends:

  • TensorFlow SavedModel export now distinguishes CUDA and non-CUDA export paths more carefully.
  • CPU exports hide TensorFlow GPUs where possible to avoid unnecessary GPU memory use.
  • ONNX Runtime and Paddle dependency checks now better handle interchangeable CPU/GPU package variants.
  • Paddle export now uses the actual export device to decide whether GPU Paddle is needed.

These changes reduce the chance of unwanted GPU memory allocation or conflicting runtime package installs during export.


:counterclockwise_arrows_button: Full Changelog

You can review every commit and change between versions in the full v8.4.86 to v8.4.87 changelog.


:rocket: Try It Now

Upgrade with:

pip install -U ultralytics

Then run your usual training, validation, prediction, tracking, or export workflows and let us know how it goes.

As always, thank you to the YOLO community and the Ultralytics team for the continued testing, feedback, and contributions that make each release better. We’d love to hear your feedback on v8.4.87! :speech_balloon: