From 77db4f3eb21334b4a59fd026d196bafb91a82542 Mon Sep 17 00:00:00 2001 From: "Wang, Mengni" Date: Fri, 16 Aug 2024 16:40:07 +0800 Subject: [PATCH] Update run_benchmark.sh Signed-off-by: Wang, Mengni --- .../quantization/ptq_static/run_benchmark.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/nlp/huggingface_model/text_to_image/stable_diffusion_v1_5/quantization/ptq_static/run_benchmark.sh b/examples/nlp/huggingface_model/text_to_image/stable_diffusion_v1_5/quantization/ptq_static/run_benchmark.sh index 79250a6a5..64974fb90 100644 --- a/examples/nlp/huggingface_model/text_to_image/stable_diffusion_v1_5/quantization/ptq_static/run_benchmark.sh +++ b/examples/nlp/huggingface_model/text_to_image/stable_diffusion_v1_5/quantization/ptq_static/run_benchmark.sh @@ -56,12 +56,11 @@ function run_benchmark { extra_cmd=$extra_cmd"--image_path=${image_path} " fi - python main.py \ - --model_path="${input_model}" \ - --batch_size="${batch_size-1}" \ - --benchmark \ - ${extra_cmd} - + if [ "$batch_size" ]; then + extra_cmd=$extra_cmd"--batch_size=${batch_size} " + fi + extra_cmd=$extra_cmd"--benchmark" + eval "python main.py --model_path=${input_model} ${extra_cmd}" } main "$@"