From 5d8e15800ebd9ae6998d1b5936d91451c82344eb Mon Sep 17 00:00:00 2001 From: Jiacong Fang Date: Tue, 31 Dec 2024 20:57:54 +0800 Subject: [PATCH] `ultralytics 8.3.56` PaddlePaddle GPU Inference support (#18468) Co-authored-by: Laughing-q <1185102784@qq.com> Co-authored-by: Glenn Jocher --- ultralytics/__init__.py | 2 +- ultralytics/engine/exporter.py | 2 +- ultralytics/nn/autobackend.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index 0de65e61..4cf03a48 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = "8.3.55" +__version__ = "8.3.56" import os diff --git a/ultralytics/engine/exporter.py b/ultralytics/engine/exporter.py index 5a249caf..eb5c7807 100644 --- a/ultralytics/engine/exporter.py +++ b/ultralytics/engine/exporter.py @@ -603,7 +603,7 @@ class Exporter: @try_export def export_paddle(self, prefix=colorstr("PaddlePaddle:")): """YOLO Paddle export.""" - check_requirements(("paddlepaddle", "x2paddle")) + check_requirements(("paddlepaddle-gpu" if torch.cuda.is_available() else "paddlepaddle", "x2paddle")) import x2paddle # noqa from x2paddle.convert import pytorch2paddle # noqa diff --git a/ultralytics/nn/autobackend.py b/ultralytics/nn/autobackend.py index 9edfa11d..70962e8e 100644 --- a/ultralytics/nn/autobackend.py +++ b/ultralytics/nn/autobackend.py @@ -133,7 +133,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, onnx]): # GPU dataloader formats + if cuda and not any([nn_module, pt, jit, engine, onnx, paddle]): # GPU dataloader formats device = torch.device("cpu") cuda = False