From d2e82fb546e56d4ba5e035c9627742d20143b242 Mon Sep 17 00:00:00 2001 From: tianlef Date: Wed, 13 Mar 2024 15:47:49 +0800 Subject: [PATCH 1/3] fix ipadapter --- .../ipadapter/{ => sd15}/sd15_export.sh | 0 .../deploy/ipadapter/{ => sd15}/sd15_infer.sh | 2 +- .../deploy/ipadapter/sd15/start.sh | 24 +++++++++++++++++++ .../ipadapter/{ => sdxl}/sdxl_export.sh | 0 .../deploy/ipadapter/{ => sdxl}/sdxl_infer.sh | 0 .../deploy/ipadapter/{ => sdxl}/start.sh | 13 ---------- 6 files changed, 25 insertions(+), 14 deletions(-) rename models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/{ => sd15}/sd15_export.sh (100%) rename models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/{ => sd15}/sd15_infer.sh (98%) create mode 100644 models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sd15/start.sh rename models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/{ => sdxl}/sdxl_export.sh (100%) rename models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/{ => sdxl}/sdxl_infer.sh (100%) rename models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/{ => sdxl}/start.sh (62%) diff --git a/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sd15_export.sh b/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sd15/sd15_export.sh similarity index 100% rename from models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sd15_export.sh rename to models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sd15/sd15_export.sh diff --git a/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sd15_infer.sh b/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sd15/sd15_infer.sh similarity index 98% rename from models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sd15_infer.sh rename to models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sd15/sd15_infer.sh index 4ff0ddb798..9f09930bbc 100644 --- a/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sd15_infer.sh +++ b/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sd15/sd15_infer.sh @@ -47,7 +47,7 @@ echo "*******ppdiffusers/deploy/sd15 ipadapter_sd15_inference_img2img end******* --scheduler "ddim" \ --backend paddle \ --device gpu \ - --task_name inpaint) 2>&1 | tee ${log_dir}/sd15_inference_inpaint.log + --task_name inpaint_legacy) 2>&1 | tee ${log_dir}/sd15_inference_inpaint.log tmp_exit_code=${PIPESTATUS[0]} exit_code=$(($exit_code + ${tmp_exit_code})) if [ ${tmp_exit_code} -eq 0 ]; then diff --git a/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sd15/start.sh b/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sd15/start.sh new file mode 100644 index 0000000000..b2b6b68ea2 --- /dev/null +++ b/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sd15/start.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +cur_path=$(pwd) +echo ${cur_path} + +work_path1=${root_path}/PaddleMIX/ppdiffusers/deploy/ipadapter/sd15 +echo ${work_path1} + +log_dir=${root_path}/deploy_log + +if [ ! -d "$log_dir" ]; then + mkdir -p "$log_dir" +fi + +/bin/cp -rf ./* ${work_path1}/ +exit_code=0 + +cd ${work_path1} + +bash sd15_export.sh +exit_code=$(($exit_code + $?)) + +bash sd15_infer.sh +exit_code=$(($exit_code + $?)) \ No newline at end of file diff --git a/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sdxl_export.sh b/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sdxl/sdxl_export.sh similarity index 100% rename from models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sdxl_export.sh rename to models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sdxl/sdxl_export.sh diff --git a/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sdxl_infer.sh b/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sdxl/sdxl_infer.sh similarity index 100% rename from models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sdxl_infer.sh rename to models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sdxl/sdxl_infer.sh diff --git a/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/start.sh b/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sdxl/start.sh similarity index 62% rename from models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/start.sh rename to models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sdxl/start.sh index 17e99f2fac..0bd23975c2 100644 --- a/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/start.sh +++ b/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sdxl/start.sh @@ -3,25 +3,12 @@ cur_path=$(pwd) echo ${cur_path} -work_path1=${root_path}/PaddleMIX/ppdiffusers/deploy/ipadapter/sd15 -echo ${work_path1} - log_dir=${root_path}/deploy_log if [ ! -d "$log_dir" ]; then mkdir -p "$log_dir" fi -/bin/cp -rf ./* ${work_path1}/ -exit_code=0 - -cd ${work_path1} - -bash sd15_export.sh -exit_code=$(($exit_code + $?)) - -bash sd15_infer.sh -exit_code=$(($exit_code + $?)) work_path2=${root_path}/PaddleMIX/ppdiffusers/deploy/ipadapter/sdxl From c3e7eb8f2dbba917e7acb9ddb79977308b95f706 Mon Sep 17 00:00:00 2001 From: tianlef Date: Wed, 13 Mar 2024 16:01:12 +0800 Subject: [PATCH 2/3] fix ipadapter file --- models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sd15/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sd15/start.sh b/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sd15/start.sh index b2b6b68ea2..0ec5c39ef3 100644 --- a/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sd15/start.sh +++ b/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sd15/start.sh @@ -21,4 +21,4 @@ bash sd15_export.sh exit_code=$(($exit_code + $?)) bash sd15_infer.sh -exit_code=$(($exit_code + $?)) \ No newline at end of file +exit_code=$(($exit_code + $?)) From 3635451587de692439074812fc22af52335a9f39 Mon Sep 17 00:00:00 2001 From: tianlef Date: Wed, 13 Mar 2024 16:32:53 +0800 Subject: [PATCH 3/3] fix ipadapter path --- .../CE/ppdiffusers/deploy/ipadapter/sd15/sd15_infer.sh | 4 ++-- .../CE/ppdiffusers/deploy/ipadapter/sdxl/sdxl_infer.sh | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sd15/sd15_infer.sh b/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sd15/sd15_infer.sh index 9f09930bbc..9b1fcf51a4 100644 --- a/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sd15/sd15_infer.sh +++ b/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sd15/sd15_infer.sh @@ -15,7 +15,7 @@ export USE_PPXFORMERS=False --scheduler "ddim" \ --backend paddle \ --device gpu \ - --task_name text2img) 2>&1 | tee ${log_dir}/deploy_ipadapter_sd15_inference_text2img.log + --task_name text2img) 2>&1 | tee ${log_dir}/ipadapter_sd15_inference_text2img.log tmp_exit_code=${PIPESTATUS[0]} exit_code=$(($exit_code + ${tmp_exit_code})) if [ ${tmp_exit_code} -eq 0 ]; then @@ -47,7 +47,7 @@ echo "*******ppdiffusers/deploy/sd15 ipadapter_sd15_inference_img2img end******* --scheduler "ddim" \ --backend paddle \ --device gpu \ - --task_name inpaint_legacy) 2>&1 | tee ${log_dir}/sd15_inference_inpaint.log + --task_name inpaint_legacy) 2>&1 | tee ${log_dir}/ipadapter_sd15_inference_inpaint.log tmp_exit_code=${PIPESTATUS[0]} exit_code=$(($exit_code + ${tmp_exit_code})) if [ ${tmp_exit_code} -eq 0 ]; then diff --git a/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sdxl/sdxl_infer.sh b/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sdxl/sdxl_infer.sh index 44fdb0834b..98ecf1f394 100644 --- a/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sdxl/sdxl_infer.sh +++ b/models/PaddleMIX/CE/ppdiffusers/deploy/ipadapter/sdxl/sdxl_infer.sh @@ -47,7 +47,7 @@ echo "*******ppdiffusers/deploy/sdxl ipadapter_sdxl_inference_img2img end******* --scheduler "ddim" \ --backend paddle \ --device gpu \ - --task_name inpaint) 2>&1 | tee ${log_dir}/sdxl_inference_inpaint.log + --task_name inpaint) 2>&1 | tee ${log_dir}/ipadapter_sdxl_inference_inpaint.log tmp_exit_code=${PIPESTATUS[0]} exit_code=$(($exit_code + ${tmp_exit_code})) if [ ${tmp_exit_code} -eq 0 ]; then @@ -84,7 +84,7 @@ echo "*******ppdiffusers/deploy/sdxl ipadapter_sdxl_inference_tune end********** --model_dir static_model/stable-diffusion-xl-base-1.0-ipadapter \ --scheduler "ddim" \ --backend paddle_tensorrt \ - --device gpu --task_name text2img) 2>&1 | tee ${log_dir}/sdxl_inference_tensorrt_text2img.log + --device gpu --task_name text2img) 2>&1 | tee ${log_dir}/ipadapter_sdxl_inference_tensorrt_text2img.log tmp_exit_code=${PIPESTATUS[0]} exit_code=$(($exit_code + ${tmp_exit_code})) if [ ${tmp_exit_code} -eq 0 ]; then @@ -100,7 +100,7 @@ echo "*******ppdiffusers/deploy/sdxl ipadapter_sdxl_inference_tensorrt_text2img --scheduler "ddim" \ --backend paddle_tensorrt \ --device gpu \ - --task_name img2img) 2>&1 | tee ${log_dir}/sdxl_inference_tensorrt_img2img.log + --task_name img2img) 2>&1 | tee ${log_dir}/ipadapter_sdxl_inference_tensorrt_img2img.log tmp_exit_code=${PIPESTATUS[0]} exit_code=$(($exit_code + ${tmp_exit_code})) if [ ${tmp_exit_code} -eq 0 ]; then @@ -116,7 +116,7 @@ echo "*******ppdiffusers/deploy/sdxl ipadapter_sdxl_inference_tensorrt_img2img e --scheduler "ddim" \ --backend paddle_tensorrt \ --device gpu \ - --task_name inpaint) 2>&1 | tee ${log_dir}/sdxl_inference_tensorrt_inpaint.log + --task_name inpaint) 2>&1 | tee ${log_dir}/ipadapter_sdxl_inference_tensorrt_inpaint.log tmp_exit_code=${PIPESTATUS[0]} exit_code=$(($exit_code + ${tmp_exit_code})) if [ ${tmp_exit_code} -eq 0 ]; then