diff --git a/requirements.txt b/requirements.txt index 1b2291e8..bde3a15d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ onnxruntime==1.15.1 pycocotools==2.0.7 PyYAML==6.0.1 scipy==1.13.0 -onnxslim==0.1.28 +onnxslim==0.1.31 onnxruntime-gpu==1.18.0 gradio==4.31.5 opencv-python==4.9.0.80 diff --git a/ultralytics/engine/exporter.py b/ultralytics/engine/exporter.py index f9d5ac76..6ac170c5 100644 --- a/ultralytics/engine/exporter.py +++ b/ultralytics/engine/exporter.py @@ -355,9 +355,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 "")] - if ARM64: - check_requirements("cmake") # 'cmake' is needed to build onnxsim on aarch64 + requirements += ["onnxslim==0.1.31", "onnxruntime" + ("-gpu" if torch.cuda.is_available() else "")] check_requirements(requirements) import onnx # noqa @@ -744,7 +742,7 @@ class Exporter: "onnx>=1.12.0", "onnx2tf>=1.15.4,<=1.17.5", "sng4onnx>=1.0.1", - "onnxslim==0.1.28", + "onnxslim==0.1.31", "onnx_graphsurgeon>=0.3.26", "tflite_support", "flatbuffers>=23.5.26,<100", # update old 'flatbuffers' included inside tensorflow package