3139e81e8a
The devnen wrapper is single-model and ignores the OpenAI model field, so offering both Dia2 models to asset-engine as real per-request choices means one fixed-model instance per model. Rework the dia stack to run two services from a dia2-capable image: * dia2-2b (:8200, best quality), dia2-1b (:8202, streaming) — both GPU 0 * each pins its model via a mounted /opt/docker/conf/dia2-*/config.yaml Retire the legacy Dia 1.6B service. New dia2-image/Dockerfile builds local/dia:v2 = upstream devnen wrapper + the dia2 package (copied into site-packages; its pyproject build backend yields an empty UNKNOWN wheel under the base's old setuptools) + the three missing runtime deps (transformers/sphn/whisper-timestamped); torch 2.12 / numpy 2.2 in the base already satisfy Dia2. Both instances verified end-to-end (HTTP 200, Ogg/Opus 24 kHz).
82 lines
3.3 KiB
YAML
82 lines
3.3 KiB
YAML
# Dia2 (Nari Labs' dialogue-focused TTS) served via devnen/Dia-TTS-Server.
|
|
#
|
|
# Dialogue scenes none of the other bench TTS own cleanly: multi-speaker
|
|
# turn-taking in one pass with inline [S1]/[S2] tags + nonverbals
|
|
# (laughs)/(coughs)/(sighs). OpenAI-compat POST /v1/audio/speech.
|
|
#
|
|
# This stack runs TWO fixed-model instances from the dia2-capable image
|
|
# (local/dia:v2 — built in two stages: the upstream devnen wrapper image
|
|
# local/dia:v1, then dia2-image/Dockerfile layers in the dia2 package +
|
|
# its missing runtime deps; see README). The wrapper serves whatever model
|
|
# is loaded and IGNORES per-request model selection, so the only way to
|
|
# offer multiple Dia2 models to asset-engine as real choices is one fixed
|
|
# instance per model — which is exactly this:
|
|
# * dia2-2b — Dia2 2B, highest quality (:8200, the primary dia port)
|
|
# * dia2-1b — Dia2 1B, streaming/faster (:8202)
|
|
# Each pins ONE model via its mounted config.yaml. Legacy Dia 1.6B retired
|
|
# (operator decision 2026-05-31).
|
|
#
|
|
# All tunables live in .env — edit that, not this file.
|
|
|
|
services:
|
|
dia2-2b:
|
|
image: local/dia:${DIA_TAG}
|
|
container_name: dia2-2b
|
|
restart: unless-stopped
|
|
runtime: nvidia
|
|
ports:
|
|
- "${DIA_BIND:-0.0.0.0}:${DIA2_2B_PORT}:8003"
|
|
environment:
|
|
- NVIDIA_VISIBLE_DEVICES=${DIA2_2B_GPU:-0}
|
|
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
|
|
- HF_HUB_ENABLE_HF_TRANSFER=1
|
|
- HF_HOME=/app/hf_cache
|
|
volumes:
|
|
- ${DIA_REFERENCE_DIR}:/app/reference_audio
|
|
- ${DIA_CACHE_DIR}:/app/hf_cache
|
|
# Pins model.repo_id=nari-labs/Dia2-2B (highest quality).
|
|
- ${DIA2_2B_CONFIG}:/app/config.yaml
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "python3 -c \"import urllib.request,sys; urllib.request.urlopen('http://127.0.0.1:8003/health', timeout=5); sys.exit(0)\""]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
# First boot pulls the Dia2-2B checkpoint — generous deadline.
|
|
start_period: 600s
|
|
labels:
|
|
- homepage.group=AI Systems
|
|
- homepage.name=Dia2 2B (HQ)
|
|
- homepage.icon=mdi-account-voice
|
|
- homepage.description=Dialogue TTS — Dia2 2B, highest quality (irv-ml1)
|
|
- homepage.href=http://10.100.79.3:${DIA2_2B_PORT}
|
|
|
|
dia2-1b:
|
|
image: local/dia:${DIA_TAG}
|
|
container_name: dia2-1b
|
|
restart: unless-stopped
|
|
runtime: nvidia
|
|
ports:
|
|
- "${DIA_BIND:-0.0.0.0}:${DIA2_1B_PORT}:8003"
|
|
environment:
|
|
- NVIDIA_VISIBLE_DEVICES=${DIA2_1B_GPU:-0}
|
|
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
|
|
- HF_HUB_ENABLE_HF_TRANSFER=1
|
|
- HF_HOME=/app/hf_cache
|
|
volumes:
|
|
- ${DIA_REFERENCE_DIR}:/app/reference_audio
|
|
- ${DIA_CACHE_DIR}:/app/hf_cache
|
|
# Pins model.repo_id=nari-labs/Dia2-1B (streaming, lower latency).
|
|
- ${DIA2_1B_CONFIG}:/app/config.yaml
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "python3 -c \"import urllib.request,sys; urllib.request.urlopen('http://127.0.0.1:8003/health', timeout=5); sys.exit(0)\""]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 600s
|
|
labels:
|
|
- homepage.group=AI Systems
|
|
- homepage.name=Dia2 1B (Streaming)
|
|
- homepage.icon=mdi-account-voice
|
|
- homepage.description=Dialogue TTS — Dia2 1B, streaming/faster (irv-ml1)
|
|
- homepage.href=http://10.100.79.3:${DIA2_1B_PORT}
|