Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Jul 25, 2024
1 parent d2a15b5 commit c761026
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions optimum/onnxruntime/modeling_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
DIFFUSION_MODEL_VAE_DECODER_SUBFOLDER,
DIFFUSION_MODEL_VAE_ENCODER_SUBFOLDER,
)
from .io_binding import TypeHelper
from .modeling_ort import ONNX_MODEL_END_DOCSTRING, ORTModel
from .utils import (
_ORT_TO_NP_TYPE,
ONNX_WEIGHTS_NAME,
get_provider_for_device,
parse_device,
Expand Down Expand Up @@ -496,8 +496,7 @@ def __init__(self, session: ort.InferenceSession, parent_model: ORTModel):
self.output_names = {output_key.name: idx for idx, output_key in enumerate(self.session.get_outputs())}
config_path = Path(session._model_path).parent / self.CONFIG_NAME
self.config = self.parent_model._dict_from_json_file(config_path) if config_path.is_file() else {}
self.input_dtype = {inputs.name: inputs.type for inputs in self.session.get_inputs()}
self.output_dtype = {outputs.name: outputs.type for outputs in self.session.get_outputs()}
self.input_dtype = {inputs.name: _ORT_TO_NP_TYPE[inputs.type] for inputs in self.session.get_inputs()}

@property
def device(self):
Expand Down

0 comments on commit c761026

Please sign in to comment.