Skip to content

Commit

Permalink
move merge decoders import
Browse files Browse the repository at this point in the history
  • Loading branch information
eaidova committed Dec 18, 2024
1 parent deb4ec3 commit be3c79c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions optimum/exporters/onnx/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Tuple, Union

from transformers.utils import is_tf_available

from ...onnx import merge_decoders
from ...utils import (
DummyAudioInputGenerator,
DummyBboxInputGenerator,
Expand Down Expand Up @@ -129,6 +127,7 @@ def post_process_exported_models(

# Attempt to merge only if the decoder-only was exported separately without/with past
if self.use_past is True and len(models_and_onnx_configs) == 2:
from ...onnx import merge_decoders
decoder_path = Path(path, onnx_files_subpaths[0])
decoder_with_past_path = Path(path, onnx_files_subpaths[1])
decoder_merged_path = Path(path, ONNX_DECODER_MERGED_NAME + ".onnx")
Expand Down

0 comments on commit be3c79c

Please sign in to comment.