Datasets:
Download DDJ_real2render/test_batch.sh from ramuuuo/Sking: direct link, hf CLI and curl.
- Browser
- Download file 1.52 kB
-
https://huggingface.co/datasets/ramuuuo/Sking/resolve/main/DDJ_real2render/test_batch.sh
- Command line
-
hf download hf://datasets/ramuuuo/Sking/DDJ_real2render/test_batch.sh
-
curl -L -o test_batch.sh https://huggingface.co/datasets/ramuuuo/Sking/resolve/main/DDJ_real2render/test_batch.sh
1.52 kB
| template_a=${template_a:-41} # 男,耳麦,卫衣 | |
| template_b=${template_b:-51} # 女 | |
| template_c=${template_c:-66} # 女,发夹,猫耳 | |
| template_d=${template_d:-72} # 皇冠,动物,眼镜 | |
| #template_d=${template_d:-70} # 皇冠,动物 | |
| #template_d=${template_d:-67} # 动物 | |
| #template_d=${template_d:-68} # 男,胡子野猪骑士 | |
| 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}" | |
| 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 | |
| for i in 46; 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 -o ${OUTPUT_FILE} | |
| done |