Yolov8 model slowing down in real time detection after 2 hours

You can try exporting to TensorRT

with torch.no_grad() shouldn’t be used with Ultralytics. And model.to() should also be removed because Ultralytics handles that.

Is your device a desktop or a laptop?