π 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 whendevice=changes betweenpredict()calls (e.g., CPU β GPU) and re-initializesself.predictorinstead of reusing the old one.
- In
- ExecuTorch export dependency fix for ARM64 Docker (PR #23064) π³π§©
- Removes the broad
setuptools<71.0.0workaround and replaces it with a targeted fix: on Linux + ARM64 + Docker, requirepackaging>=22.0to avoid build/export issues.
- Removes the broad
- 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 timesdevice=0, the predictor will no longer βcarry overβ device-specific state that can cause incorrect or surprising results.
- If you run a long-lived process and sometimes call
- 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
- refactor: β»οΈ remove setuptools check_requirements in executorch export by @onuralpszr in #23064
- Dockerfile improvements by @glenn-jocher in #23090
- YAML fixes by @glenn-jocher in #23092
ultralytics 8.3.244Reset YOLO predictor on device change by @Y-T-G in #23086
Full Changelog: v8.3.243...v8.3.244