pypi ultralytics 8.3.220
v8.3.220 - `ultralytics 8.3.220` Add ExecuTorch export (.pte) with XNNPACK (#22244)

11 hours ago

🌟 Summary

ExecuTorch export lands! You can now export YOLO11/YOLO26 models to .pte with XNNPACK acceleration for fast, native on-device inference on mobile and edge devices. Plus, a stability fix for CLIP embedding extraction in VisualAI. 📱⚡🧠

📊 Key Changes

  • ExecuTorch export (primary update)
    • New export target: format=executorch → outputs a .pte model inside a <name>_executorch_model/ directory
    • Integrated into export_formats() and the exporter flow
    • New export_executorch() method using torch.export, XnnpackPartitioner, and to_edge_transform_and_lower
    • Saves model metadata alongside the .pte file for easy integration
    • Backend/runtime support added in AutoBackend for .pte loading and inference dispatch
    • Docs: New ExecuTorch integration guide and export tables updated
    • Tests: Added CLI and matrix export tests (skipped on Windows)
  • VisualAI stability improvement
    • Safely detaches CLIP embeddings before converting to NumPy to avoid autograd errors and reduce memory overhead

Minimal usage:

  • CLI: yolo export model=yolo11n.pt format=executorch
  • Python:
    from ultralytics import YOLO
    YOLO("yolo11n.pt").export(format="executorch")

Helpful links:

🎯 Purpose & Impact

  • Mobile and edge deployment made easy 🚀
    • One-line export to .pte for running models on iOS, Android, and embedded Linux devices via ExecuTorch
    • Uses XNNPACK by default for optimized CPU performance on mobile
    • Early benchmarks on devices like Raspberry Pi indicate notable speedups (around 2x in example tests), with accuracy parity
  • Streamlined developer workflow ✅
    • Feels like any other Ultralytics export target; consistent UX and metadata packaging
    • Clear docs and examples for integrating on mobile and embedded platforms
  • Compatibility notes 🧩
    • Requires Python 3.10+, PyTorch ≥ 2.9, executorch and flatbuffers installed
    • Export writes both .pte and metadata.yaml; inference via ExecuTorch runtime (not standard Python YOLO() loading)
  • Improved stability for VisualAI 🔒
    • Detaching CLIP embeddings prevents gradient-related errors and reduces memory use during similarity search

Overall, this release expands deployment options for YOLO11/YOLO26—especially for mobile and edge users—while improving robustness in VisualAI workflows. 🎉

What's Changed

Full Changelog: v8.3.219...v8.3.220

Don't miss a new ultralytics release

NewReleases is sending notifications on new releases.