Files
codex-market-app/gen-image/gen.sh
T
2026-07-18 11:00:23 +08:00

15 lines
729 B
Bash
Executable File

#!/usr/bin/env bash
# gen.sh — 生图快捷入口。用法:
# ./gen.sh "提示词" # 文生图,默认 1024x1024
# ./gen.sh "提示词" --size 2k-landscape # 透传任意 gen_image.py 参数
# ./gen.sh "提示词" --style natural # 部分模型/中转支持独立风格参数
# ./gen.sh "换成雪山背景" --edit in.png # 图生图
# 无论从哪个目录调用都能正确定位脚本与 .env。
set -euo pipefail
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [ "$#" -eq 0 ]; then
echo "用法: ./gen.sh \"提示词\" [--size 1k-square|2k-landscape|4k-wide] [--quality high] [--style natural] [--edit 图.png] ..." >&2
exit 1
fi
exec python3 "$DIR/scripts/gen_image.py" "$@"