Files
esh-pfi-infrastructure/stacks/ace-step
vh d2ed7671d7 ace-step: patch upstream infer-api + missing runtime deps + cache mount
Three upstream gaps surfaced once /generate was actually exercised:

  1. infer-api.py builds an 18-arg positional tuple but the pipeline
     expects 24 — first missing arg is `format`, so audio_duration
     shifts into format's slot and the pipeline calls len() on an
     int. Ship a patched copy of infer-api.py and COPY over upstream's
     in the Dockerfile. Also handle empty lora_name_or_path -> "none"
     (empty string trips HF Hub's repo-id validator).
  2. torchcodec + ffmpeg are required by the WAV save path but neither
     is in upstream requirements.txt. Without them every /generate
     runs to completion and then 500s at write-time.
  3. ACE-Step caches checkpoints at /root/.cache/ace-step/checkpoints
     (HARDCODED, not honored by HF_HOME). Mount our persistent dir
     there so the ~7 GB model survives container recreates.

Bench on A6000 (cached model, lo-fi hip hop, 60-step euler/apg):
  10s @ 27 steps -> 9.4s  (0.94x)
  30s @ 60 steps -> 11.2s (0.37x, ~2.7x realtime)
  60s @ 60 steps -> 14.8s (0.24x, ~4x realtime)
2026-04-28 09:42:07 -07:00
..

ace-step

ACE-Step 1.5 — Apache 2.0 open-source music generation foundation model. Hybrid diffusion + LLM. Generates lyric-aware multi-minute songs (vocals + instrumentation).

host irv-ml1
port 8210
GPU A6000 (device_ids: ["1"])
VRAM ~10-12 GB during inference
upstream https://github.com/ace-step/ACE-Step
license Apache 2.0

API surface

infer-api.py (FastAPI) exposes:

  • GET /health — liveness, returns 200 once the process is up (model is lazy-loaded on first /generate).
  • POST /generate — body: ACEStepInput Pydantic model with ~27 params (prompt, lyrics, audio_duration, guidance_scale, etc.). Returns {status, output_path, message}.

The container does NOT expose the Gradio UI — we override the upstream default python3 acestep/gui.py with python3 infer-api.py. If you want the Gradio UI for ad-hoc experimentation, run a one-off:

ssh irv-ml1 'docker exec -it ace-step python3 acestep/gui.py --server_name 0.0.0.0 --port 7865'

…and port-forward 7865 to your laptop.

Deploy

scripts/elway irv-ml1 --playbook playbooks/deploy-ace-step.yaml

Idempotent. Cold build is ~10-15 min (CUDA + torch + transformers + spacy + audio deps). First /generate triggers the model download (~5-10 GB) and warmup (~30-60 s).

Tunables

See .env.example — copy to .env on the host (lives at /opt/docker/compose/ace-step/.env, gitignored). Common knobs:

  • ACE_STEP_SHA — pin upstream commit
  • ACE_STEP_GPU_DEVICES — GPU index
  • ACE_STEP_*_DIR — bind-mount paths under /worktank/ace-step/