From 3df9d278dce67eec7fdb4fddc0aab22fee62588f Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 22 Jun 2024 13:41:12 +0200 Subject: [PATCH] `ultralytics 8.2.39` update `onnxslim>=0.1.31` (#13883) Signed-off-by: Glenn Jocher Co-authored-by: Kayzwer <68285002+Kayzwer@users.noreply.github.com> --- ultralytics/__init__.py | 2 +- ultralytics/engine/exporter.py | 4 ++-- ultralytics/utils/__init__.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index df689f85..51e1bf47 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = "8.2.38" +__version__ = "8.2.39" import os diff --git a/ultralytics/engine/exporter.py b/ultralytics/engine/exporter.py index 9795837f..5f8953f1 100644 --- a/ultralytics/engine/exporter.py +++ b/ultralytics/engine/exporter.py @@ -388,7 +388,7 @@ class Exporter: """YOLOv8 ONNX export.""" requirements = ["onnx>=1.12.0"] if self.args.simplify: - requirements += ["onnxslim==0.1.28", "onnxruntime" + ("-gpu" if torch.cuda.is_available() else "")] + requirements += ["onnxslim>=0.1.31", "onnxruntime" + ("-gpu" if torch.cuda.is_available() else "")] check_requirements(requirements) import onnx # noqa @@ -827,7 +827,7 @@ class Exporter: "onnx>=1.12.0", "onnx2tf>1.17.5,<=1.22.3", "sng4onnx>=1.0.1", - "onnxslim==0.1.28", + "onnxslim>=0.1.31", "onnx_graphsurgeon>=0.3.26", "tflite_support<=0.4.3" if IS_JETSON else "tflite_support", # fix ImportError 'GLIBCXX_3.4.29' "flatbuffers>=23.5.26,<100", # update old 'flatbuffers' included inside tensorflow package diff --git a/ultralytics/utils/__init__.py b/ultralytics/utils/__init__.py index 50cc939c..b9320551 100644 --- a/ultralytics/utils/__init__.py +++ b/ultralytics/utils/__init__.py @@ -1070,7 +1070,7 @@ TESTS_RUNNING = is_pytest_running() or is_github_action_running() set_sentry() # Apply monkey patches -from .patches import imread, imshow, imwrite, torch_save +from ultralytics.utils.patches import imread, imshow, imwrite, torch_save torch.save = torch_save if WINDOWS: