diff --git a/ultralytics/nn/autobackend.py b/ultralytics/nn/autobackend.py index 596d9bda..da7e8bd4 100644 --- a/ultralytics/nn/autobackend.py +++ b/ultralytics/nn/autobackend.py @@ -101,7 +101,7 @@ class AutoBackend(nn.Module): # Set device cuda = torch.cuda.is_available() and device.type != 'cpu' # use CUDA - if cuda and not any([nn_module, pt, jit, engine]): # GPU dataloader formats + if cuda and not any([nn_module, pt, jit, engine, onnx]): # GPU dataloader formats device = torch.device('cpu') cuda = False