From e5fb400b622d8b470275ba6e1999490d64716f93 Mon Sep 17 00:00:00 2001 From: Ekaterina Aidova Date: Fri, 1 Nov 2024 11:11:41 +0400 Subject: [PATCH] fix order of hidden states in text encoder (#984) * fix order of hidden states in text encoder * Update optimum/intel/openvino/modeling_diffusion.py --- optimum/intel/openvino/modeling_diffusion.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/optimum/intel/openvino/modeling_diffusion.py b/optimum/intel/openvino/modeling_diffusion.py index 8bca8cc9a8..dd212cd76c 100644 --- a/optimum/intel/openvino/modeling_diffusion.py +++ b/optimum/intel/openvino/modeling_diffusion.py @@ -995,9 +995,9 @@ def modules(self): class OVModelTextEncoder(OVPipelinePart): def __init__(self, model: openvino.runtime.Model, parent_pipeline: OVDiffusionPipeline, model_name: str = ""): super().__init__(model, parent_pipeline, model_name) - self.hidden_states_output_names = sorted( - {name for out in self.model.outputs for name in out.names if name.startswith("hidden_states")} - ) + self.hidden_states_output_names = [ + name for out in self.model.outputs for name in out.names if name.startswith("hidden_states") + ] def forward( self,