File size: 642 Bytes
cf8a54e
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/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}" "$@"