Skip to content

Commit e48a9ed

Browse files
committed
Code cleanup-2
Signed-off-by: Amit Raj <[email protected]>
1 parent e579c88 commit e48a9ed

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

QEfficient/diffusers/pipelines/pipeline_utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,16 @@ def get_onnx_config(self):
3838

3939
example_inputs = {
4040
"input_ids": torch.zeros((bs, seq_len), dtype=torch.int64),
41-
"output_hidden_states": True,
4241
}
4342

4443
dynamic_axes = {"input_ids": {0: "batch_size", 1: "seq_len"}}
4544

4645
output_names = ["pooler_output", "last_hidden_state"]
46+
if self.model.__class__.__name__ == "T5EncoderModel":
47+
output_names = ["last_hidden_state"]
48+
else:
49+
example_inputs["output_hidden_states"] = (True,)
50+
4751
return example_inputs, dynamic_axes, output_names
4852

4953
def export(self, inputs, output_names, dynamic_axes, export_dir=None):

QEfficient/diffusers/pipelines/stable_diffusion_3/pipeline_stable_diffusion3.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ def compile(
242242
)
243243

244244
self.text_encoder_compile_path = self.text_encoder._compile(
245+
onnx_path,
245246
compile_dir,
246247
compile_only=True,
247248
specializations=specializations_text_encoder,

0 commit comments

Comments
 (0)