UltraTex-Qwen-Image-2.1 / code /scripts /precompute_text_mv.sh
sekkit's picture orwelian84's picture
Duplicate from orwelian84/UltraTex-Qwen-Image-2.1
cf8a54e
Raw History Blame Contribute Delete
642 Bytes
#!/usr/bin/env bash
# Encode the (empty) texturing prompt once per backbone with ComfyUI's text encoders.
# Usage: BACKBONE=qwen21|krea2 bash scripts/precompute_text_mv.sh [--prompt "..."]...
set -Eeuo pipefail
cd "$(dirname "$0")/.."
source scripts/mv_env.sh
BACKBONE=${BACKBONE:-qwen21}
case "${BACKBONE}" in
krea2) TE=${KREA2_TEXT_ENCODER} ;;
qwen21) TE=${QWEN21_TEXT_ENCODER} ;;
*) echo "BACKBONE must be krea2 or qwen21" >&2; exit 2 ;;
esac
OUT=${OUT:-checkpoints/${BACKBONE}/text_cond.safetensors}
exec "${MV_PYTHON}" tools/precompute_text_conditioning.py --backbone "${BACKBONE}" --text-encoder "${TE}" --out "${OUT}" "$@"