Skip to content

Commit

Permalink
[PIR][SD INFER] not delete amp pass (PaddlePaddle#792)
Browse files Browse the repository at this point in the history
PIR下,不需要删除auto_mixed_precision_pass,否则会导致推理性能下降很多。

Co-authored-by: xuzhang <[email protected]>
  • Loading branch information
yuanlehome and westfish authored Nov 1, 2024
1 parent 389d896 commit 38e4e18
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion ppdiffusers/deploy/controlnet/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ def main(args):
no_need_passes = [
"trt_prompt_tuning_embedding_eltwise_layernorm_fuse_pass",
"add_support_int8_pass",
"auto_mixed_precision_pass",
"conv_elementwise_add_fuse_pass",
]
paddle_delete_passes = dict(
Expand Down
1 change: 0 additions & 1 deletion ppdiffusers/deploy/ipadapter/sd15/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ def main(args):
no_need_passes = [
"trt_prompt_tuning_embedding_eltwise_layernorm_fuse_pass",
"add_support_int8_pass",
"auto_mixed_precision_pass",
"elementwise_groupnorm_act_pass",
"groupnorm_act_pass",
"preln_elementwise_groupnorm_act_pass",
Expand Down
1 change: 0 additions & 1 deletion ppdiffusers/deploy/ipadapter/sdxl/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ def main(args):
no_need_passes = [
"trt_prompt_tuning_embedding_eltwise_layernorm_fuse_pass",
"add_support_int8_pass",
"auto_mixed_precision_pass",
]
paddle_delete_passes = dict( # noqa
text_encoder=only_fp16_passes + no_need_passes if not args.use_fp16 else no_need_passes,
Expand Down
1 change: 0 additions & 1 deletion ppdiffusers/deploy/sd15/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ def main(args):
no_need_passes = [
"trt_prompt_tuning_embedding_eltwise_layernorm_fuse_pass",
"add_support_int8_pass",
"auto_mixed_precision_pass",
"elementwise_groupnorm_act_pass",
"groupnorm_act_pass",
"preln_elementwise_groupnorm_act_pass",
Expand Down
1 change: 0 additions & 1 deletion ppdiffusers/deploy/sdxl/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ def main(args):
no_need_passes = [
"trt_prompt_tuning_embedding_eltwise_layernorm_fuse_pass",
"add_support_int8_pass",
"auto_mixed_precision_pass",
]
paddle_delete_passes = dict( # noqa
text_encoder=only_fp16_passes + no_need_passes if not args.use_fp16 else no_need_passes,
Expand Down
2 changes: 0 additions & 2 deletions ppdiffusers/deploy/svd/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,11 @@ def main(args):
no_need_passes = [
"trt_prompt_tuning_embedding_eltwise_layernorm_fuse_pass",
"add_support_int8_pass",
"auto_mixed_precision_pass",
"trt_cross_multihead_matmul_fuse_pass",
"trt_flash_multihead_matmul_fuse_pass",
"preln_elementwise_groupnorm_act_pass",
"elementwise_groupnorm_act_pass",
"groupnorm_act_pass",
"auto_mixed_precision_pass",
"conv_elementwise_add_fuse_pass",
]
paddle_delete_passes = dict( # noqa
Expand Down

0 comments on commit 38e4e18

Please sign in to comment.