# Fish Audio S2-Pro stack tunables. Copy to `.env` on irv-ml1 before
# deploying.

# ── build pin ────────────────────────────────────────────────────────
# SHA of fishaudio/fish-speech to build from. Bump + rebuild when you
# want upstream wrapper updates. Use the FULL 40-char SHA — docker
# buildx's git source resolver doesn't accept short hashes.
FISH_S2_SHA=main

# Local image tag — bump when you change build context to force a
# fresh layer build.
FISH_S2_TAG=v1

# ── network ──────────────────────────────────────────────────────────
# Host port (container listens on 8080 internally; we map to 8195
# externally to fit alongside the rest of the irv-ml1 TTS slate).
# Port reservations on irv-ml1: 8188 ComfyUI, 8190 CosyVoice, 8191
# Qwen3-TTS, 8192 IndexTTS-2, 8193 Kokoro, 8194 VibeVoice, 8196
# Chatterbox, 8765 Parakeet ASR.
FISH_S2_PORT=8195
FISH_S2_BIND=0.0.0.0

# ── runtime / GPU ────────────────────────────────────────────────────
# GPU pinning. "0" = RTX 3090 (24 GB), "1" = RTX A6000 (48 GB), "all"
# = both visible. Fish S2-Pro consumes ~17 GB during inference (4B
# model + KV cache), so the A6000 is the right home with comfortable
# headroom. The 3090's 24 GB CAN fit it but leaves ~5 GB for KV which
# is tight for long contexts.
FISH_S2_GPU_DEVICES=1

# torch.compile on first inference of each shape adds ~60 s warmup but
# unlocks ~10× speedup per upstream. Worth it for sustained use; flip
# to 0 to disable if you hit a torch.compile bug on a future
# checkpoint.
FISH_S2_COMPILE=1

# Model variant. Both checkpoints are pre-pulled by the deploy
# playbook into /worktank/fish-s2/checkpoints/. Swap by editing this
# value + `docker compose up -d --force-recreate` (no rebuild needed).
#   s2-pro   — 4B-class, highest quality, ~7-8 s TTFB on a long phrase
#   s1-mini  — lighter, ~3-5× smaller model.pth, expected ~2-3 s TTFB
# fishaudio/s1-mini on HF is gated, but niobures/OpenAudio-S1 mirrors
# the same files openly — playbook pulls from there.
FISH_S2_MODEL=s2-pro

# ── persistent storage on the host ───────────────────────────────────
# Model checkpoints — Fish auto-downloads s2-pro on first run (~9 GB
# at BF16) and caches under here. Persistent across container
# recreates so we don't re-pull.
FISH_S2_CHECKPOINT_DIR=/worktank/fish-s2/checkpoints

# Reference audio for voice cloning. Drop clean ~5-15 s clips here
# (WAV / FLAC / MP3); the wrapper scans on request. One clean clip
# per voice; name them descriptively.
FISH_S2_REFERENCE_DIR=/worktank/fish-s2/references

# HF cache — persistent across container recreates to skip the model
# re-pull. Worth ~9 GB on disk.
FISH_S2_CACHE_DIR=/worktank/fish-s2/hf_cache
