🌟 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 usingtorch.export
,XnnpackPartitioner
, andto_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)
- New export target:
- 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:
- Learn more in the ExecuTorch integration docs
- ExecuTorch overview and usage: Deploy YOLO11 with ExecuTorch
- ExecuTorch project: Meta’s ExecuTorch
🎯 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
- One-line export to
- 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
andflatbuffers
installed - Export writes both
.pte
andmetadata.yaml
; inference via ExecuTorch runtime (not standard PythonYOLO()
loading)
- Requires Python 3.10+, PyTorch ≥ 2.9,
- 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
- Fix
VisualAI
clip feature extraction numpy() grad error by @RizwanMunawar in #22463 ultralytics 8.3.220
Add ExecuTorch export (.pte) with XNNPACK by @ambitious-octopus in #22244
Full Changelog: v8.3.219...v8.3.220