Skip to content

Commit

Permalink
fix order of hidden states in text encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
eaidova committed Oct 31, 2024
1 parent 5f539d5 commit 80f57b5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions optimum/intel/openvino/modeling_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 80f57b5

Please sign in to comment.