Sking / DDJ_real2render /test_batch.sh
EntropyDrop
update
bc88e82
Raw
History Blame Contribute Delete
1.44 kB
template_a=${template_a:-41} # 男,耳麦,卫衣
template_b=${template_b:-51} # 女
template_c=${template_c:-65} # 男 中长发型
template_d=${template_d:-66} # 女,发夹,猫耳
template_e=${template_e:-67} # 动物
IS_OFFICIAL=0
PROMPT_IDX=1
if [ $IS_OFFICIAL -eq 1 ]; then
OUTPUT_PREFIX="test_output/official"
ENTRY="official_api_test.py"
else
OUTPUT_PREFIX="test_output/unofficial"
ENTRY="real2render.py"
fi
SIZE="1K"
OUTPUT_DIR="${OUTPUT_PREFIX}_prompt${PROMPT_IDX}_${SIZE}_t${template_a}_${template_b}_${template_c}_${template_d}_${template_e}"
mkdir -p $OUTPUT_DIR
for i in 3 10 12 23 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45; do
if [ -f "test_input/img${i}.png" ]; then
img_file="test_input/img${i}.png"
elif [ -f "test_input/img${i}.jpg" ]; then
img_file="test_input/img${i}.jpg"
else
echo "Warning: test_input/img${i} not found."
continue
fi
OUTPUT_FILE="${OUTPUT_DIR}/img${i}.png"
# if exists ignored
if [ -f "${OUTPUT_FILE}" ]; then
echo "Warning: ${OUTPUT_FILE} exists. Ignored."
continue
fi
python ${ENTRY} "$img_file" -s $SIZE --prompt "prompts/prompt${PROMPT_IDX}.txt" -t template/template${template_a}.png -t template/template${template_b}.png -t template/template${template_c}.png -t template/template${template_d}.png -t template/template${template_e}.png -o ${OUTPUT_FILE}
done