pypi ultralytics 8.3.189
v8.3.189 - `ultralytics 8.3.189` 3x faster inplace `model.fuse()` (#21844)

latest releases: 8.3.191, 8.3.190
4 days ago

🌟 Summary

ultralytics 8.3.189 delivers a 3x faster in-place model.fuse() for leaner, quicker inference, plus better NVIDIA Jetson handling with version-aware detection and more robust autobackend behavior. 🚀

📊 Key Changes

  • In-place layer fusion (primary change) ⚡

    • Conv/BatchNorm and Deconv/BatchNorm fusion now happens in-place, updating existing layers directly with gradients disabled.
    • Smarter bias handling (including transposed conv): correctly registers or updates fused bias without creating new layer objects.
    • Result: faster fuse(), lower memory use, and cleaner models. See PR “3x faster inplace model.fuse()” by @glenn-jocher.
  • Jetson-aware autobackend improvements ✅

    • On Jetson with JetPack 5: move the model to device before fuse() to avoid runtime issues; other devices fuse first, then move to device.
    • attempt_load_weights now performs fuse().eval() before a single, final .to(device) for consistency.
    • is_jetson is imported and cached for faster repeated checks. See PR “Autobackend model.fuse() order of operations speedup” by @Laughing-q.
  • Version-aware Jetson detection 🔍

  • Version bump

    • version → 8.3.189.

🎯 Purpose & Impact

  • Faster inference setups and smaller memory footprint 🚀

    • In-place fuse() eliminates extra allocations and object creation, accelerating model preparation and inference.
  • More reliable Jetson deployments, especially on JetPack 5 🧩

    • Adjusted fuse/device order fixes fusion-related errors on edge devices, improving stability in production pipelines.
  • Easier, precise hardware targeting 🛠️

    • Version-aware is_jetson() enables conditional logic by JetPack version (e.g., selecting models, dependencies, or optimizations) with a simple call.
  • Backward compatible and safer defaults ✅

    • Existing usage of model.fuse() and is_jetson() continues to work, now faster and more robust.

Quick examples:

  • Faster in-place fusion

    from ultralytics import YOLO
    
    model = YOLO('yolov8n.pt').model
    model = model.fuse()  # now runs ~3x faster and in-place
  • Jetson version checks

    from ultralytics.utils import is_jetson
    
    if is_jetson():        # Any Jetson
        ...
    if is_jetson(5):       # Specifically JetPack 5
        ...

Happy building and deploying! ✨

What's Changed

Full Changelog: v8.3.188...v8.3.189

Don't miss a new ultralytics release

NewReleases is sending notifications on new releases.