From 80f57b5000659f44d97b5f2d11b17afcefbd1a9a Mon Sep 17 00:00:00 2001 From: eaidova Date: Thu, 31 Oct 2024 18:04:38 +0400 Subject: [PATCH] fix order of hidden states in text encoder --- optimum/intel/openvino/modeling_diffusion.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/optimum/intel/openvino/modeling_diffusion.py b/optimum/intel/openvino/modeling_diffusion.py index 8bca8cc9a8..42d52a81db 100644 --- a/optimum/intel/openvino/modeling_diffusion.py +++ b/optimum/intel/openvino/modeling_diffusion.py @@ -995,9 +995,7 @@ 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,