pypi ultralytics 8.3.244
v8.3.244 - `ultralytics 8.3.244` Reset YOLO predictor on device change (#23086)

12 hours ago

🌟 Summary (single-line synopsis)

YOLO inference is now safer when switching devices mid-run by automatically resetting the predictor to avoid stale state issues πŸ”„πŸ–₯οΈβœ…

πŸ“Š Key Changes

  • Predictor reset on device change (main update, PR #23086 by @Y-T-G) πŸ”
    • In ultralytics/engine/model.py, the model now detects when device= changes between predict() calls (e.g., CPU ↔ GPU) and re-initializes self.predictor instead of reusing the old one.
  • ExecuTorch export dependency fix for ARM64 Docker (PR #23064) 🐳🧩
    • Removes the broad setuptools<71.0.0 workaround and replaces it with a targeted fix: on Linux + ARM64 + Docker, require packaging>=22.0 to avoid build/export issues.
  • Docker + examples polish and reliability improvements (PR #23090, #23092) πŸ³πŸ› οΈπŸ“š
    • Cleaner, more reproducible Docker builds (less layer bloat, more consistent installs).
    • ONNXRuntime C++ demo preprocessing fixes (letterbox/shape handling), plus small hardening/robustness tweaks in examples and tests.
    • Documentation/config wording cleanup (including references updated to YOLO11) ✍️

🎯 Purpose & Impact

  • More reliable predictions in real apps/services πŸš€
    • If you run a long-lived process and sometimes call model.predict(device="cpu") and other times device=0, the predictor will no longer β€œcarry over” device-specific state that can cause incorrect or surprising results.
  • Minimal impact for typical users πŸ™‚
    • If you keep the same device, behavior is effectively unchanged (it continues to reuse the existing predictor for efficiency).
  • Smoother exports and deployments πŸ“¦
    • ARM64 Docker users exporting to ExecuTorch should see fewer dependency-related failures.
    • Docker images and example integrations become easier to build/run consistently across environments.

What's Changed

Full Changelog: v8.3.243...v8.3.244

Don't miss a new ultralytics release

NewReleases is sending notifications on new releases.