Skip to content

Commit

Permalink
fix order of hidden states in text encoder (#984)
Browse files Browse the repository at this point in the history
* fix order of hidden states in text encoder

* Update optimum/intel/openvino/modeling_diffusion.py
  • Loading branch information
eaidova authored Nov 1, 2024
1 parent cead516 commit e5fb400
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions optimum/intel/openvino/modeling_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e5fb400

Please sign in to comment.