When exporting a YOLOv8 model to ONNX format using the latest torch.onnx.export function (which uses the torch.export backend with Dynamo by default), the resulting ONNX model produces incorrect predictions during inference.
It works correctly when using legacy TorchScript exporter, when setting dynamo=False explicitly.