Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
eaidova committed Dec 19, 2024
1 parent be3c79c commit f3962ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions optimum/exporters/onnx/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,6 @@ def fix_dynamic_axes(

# We branch here to avoid doing an unnecessary forward pass.
if to_fix:
import onnx

if input_shapes is None:
input_shapes = {}
dummy_inputs = self.generate_dummy_inputs(framework="np", **input_shapes)
Expand Down
2 changes: 2 additions & 0 deletions optimum/exporters/onnx/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Tuple, Union

from transformers.utils import is_tf_available

from ...utils import (
DummyAudioInputGenerator,
DummyBboxInputGenerator,
Expand Down Expand Up @@ -128,6 +129,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 f3962ca

Please sign in to comment.