From fe140c6f106e1d490d1e9cc3a275130d62d5cae9 Mon Sep 17 00:00:00 2001 From: Joshua Lochner Date: Thu, 29 Aug 2024 16:23:49 +0000 Subject: [PATCH] Upgrade Siglip to opset=14 --- optimum/exporters/onnx/model_configs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/optimum/exporters/onnx/model_configs.py b/optimum/exporters/onnx/model_configs.py index b5db3feeff..4d2ced6fc1 100644 --- a/optimum/exporters/onnx/model_configs.py +++ b/optimum/exporters/onnx/model_configs.py @@ -1087,7 +1087,9 @@ class SiglipNormalizedConfig(CLIPNormalizedConfig): class SiglipOnnxConfig(CLIPOnnxConfig): NORMALIZED_CONFIG_CLASS = SiglipNormalizedConfig - DEFAULT_ONNX_OPSET = 13 + # torch.onnx.errors.UnsupportedOperatorError: Exporting the operator 'aten::scaled_dot_product_attention' to ONNX opset version 13 is not supported. + # Support for this operator was added in version 14, try exporting with this version. + DEFAULT_ONNX_OPSET = 14 @property def inputs(self) -> Dict[str, Dict[int, str]]: