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,