Skip to content

Commit cf5c6ec

Browse files
echarlaixhans00
andauthored
Increase clip ONNX opset (#2256)
* Fix `CLIPSdpaAttention` had dropped since v4.48 * increase min clip opset * style --------- Co-authored-by: Hans <[email protected]>
1 parent cf8eca0 commit cf5c6ec

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

optimum/exporters/onnx/model_configs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,7 @@ class CLIPNormalizedConfig(NormalizedTextAndVisionConfig):
11061106

11071107
class CLIPVisionModelOnnxConfig(VisionOnnxConfig):
11081108
NORMALIZED_CONFIG_CLASS = NormalizedVisionConfig
1109+
DEFAULT_ONNX_OPSET = 14 # scaled_dot_product_attention support was added in opset 14
11091110

11101111
@property
11111112
def inputs(self) -> Dict[str, Dict[int, str]]:
@@ -1129,6 +1130,7 @@ def patch_model_for_export(
11291130

11301131
class CLIPOnnxConfig(TextAndVisionOnnxConfig):
11311132
NORMALIZED_CONFIG_CLASS = CLIPNormalizedConfig
1133+
DEFAULT_ONNX_OPSET = 14 # scaled_dot_product_attention support was added in opset 14
11321134

11331135
@property
11341136
def inputs(self) -> Dict[str, Dict[int, str]]:

0 commit comments

Comments
 (0)