#!/usr/bin/env bash # 서연 표정 변주 일괄 생성. 베이스(base-v1.png)를 -i 참조로 넘겨 아이덴티티/프레이밍/배경을 # 고정하고 표정만 교체한다. 동일 평면 회색 배경(#C9CDD2)으로 컷아웃 일관성 확보. set -uo pipefail cd "$(dirname "$0")" GEN="$HOME/.codex/imagegen-headless/codex_imagegen.sh" BASE="base-v1.png" # 변주: 이름 | 표정 설명 read -r -d '' INVARIANTS <<'EOF' || true INVARIANTS (절대 바꾸지 말 것): EXACTLY the same character — identical face, identical long brown wavy hair that is center-parted with straight horizontal bangs and side locks framing the face past the shoulders, identical grayish-blue crewneck top (shoulders only), identical skin tone and shading style. EXACTLY the same head-and-shoulders bust framing: centered, perfectly front-facing, symmetrical, same scale and position, same soft even frontal lighting, same flat solid light gray background (#C9CDD2) with absolutely no gradient, no shadow on background, no floor, no scenery. The ONLY thing that changes is the facial expression described below. Semi-realistic soft anime style, Ghibli-like warmth. No text, no watermark, no signature, no hands, no jewelry. Keep bangs above the eyes unless the expression explicitly closes the eyes. EOF declare -a VARIANTS=( "sad|eyes gently downcast and sorrowful, inner eyebrows raised and slightly pinched upward together, mouth a soft small downturned frown, an overall melancholic downcast depressed mood. Eyes remain open." "tired|heavy drowsy half-closed eyelids, relaxed slightly drooping eyebrows, soft neutral slightly parted mouth, weary exhausted mood. Eyes mostly open but heavy." "anxious|worried anxious uneasy expression, eyes slightly wider and tense, eyebrows raised and pulled slightly together, mouth closed and tense, faint furrow of concern. Eyes open." "warm|a warm gentle genuine soft smile, eyes slightly curved into gentle warm crescents, very subtle relaxed uplift of the mouth corners, kind comforting reassured mood. Eyes open." "startled|startled surprised expression, eyes wide open round, eyebrows raised high, mouth slightly open in a small oval, mild shock. Eyes wide open." "eyes-closed|eyes gently and fully closed in a relaxed slow blink, smooth closed eyelids, gentle relaxed neutral mouth, calm. (Bangs still above the closed eyes.)" "speaking|mouth opened slightly as if speaking mid-sentence (small natural mouth opening), relaxed open eyes, calm neutral brow, talking expression. Eyes open." ) for entry in "${VARIANTS[@]}"; do name="${entry%%|*}" desc="${entry#*|}" out="var-${name}-v1.png" echo "==============================" echo "[gen] $name -> $out" prompt="Use the supplied reference image as the exact character and framing to preserve. Generate the SAME character with ONLY the facial expression changed. EXPRESSION: ${desc} ${INVARIANTS}" if bash "$GEN" --out "$out" --size 1024x1280 --quality high -i "$BASE" --prompt "$prompt" >/tmp/seoyeon_${name}.log 2>&1; then echo "[ok] $out ($(stat -c %s "$out" 2>/dev/null || echo '?') bytes)" else echo "[FAIL] $name — log:" tail -15 "/tmp/seoyeon_${name}.log" fi done echo "==============================" echo "ALL DONE" ls -la var-*-v1.png 2>/dev/null