f8ecc6c047
The pre-fix wrapper at stacks/ace-step/infer-api.py returned a JSON
{output_path: "..."} reference to a file written inside the
container at /app/outputs/. That path was unreachable from outside
the container — every consumer got 134 bytes of JSON-pretending-to-
be-WAV instead of audio. Surfaced by the asset_engine consumer's
end-to-end smoke (althing thread 01KRCJF7NGMXYE9F62Q1A6KFD4 msg 5);
my own earlier smoke missed it because I checked HTTP=200 and stopped
reading instead of inspecting the response body.
Wrapper now reads back the file the pipeline writes and streams the
bytes via fastapi.responses.Response with media_type set from the
audio_format request field (audio/wav | audio/mpeg | audio/flac).
The in-container path is exposed via X-Output-Path header for log
correlation but is no longer load-bearing.
Verified end-to-end against live ace-step on irv-ml1:
POST /generate -> HTTP 200 in 80s
content-type: audio/wav
content-length: 945226
x-output-path: /app/outputs/output_cfe87d1d....wav
$ file response.wav
RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit,
stereo 48000 Hz
Catalog: ace-step bumped version 3 -> 4. Dropped
response.output_field (no longer applicable). reproducibility.notes
expanded to record both the v2 18-arg-tuple fix and this v4
inline-streaming change so the history is auditable from the
catalog itself.
Stale ACEStepOutput Pydantic model left in infer-api.py for now —
unused but small; future cleanup.
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:ACEStepInputPydantic 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 commitACE_STEP_GPU_DEVICES— GPU indexACE_STEP_*_DIR— bind-mount paths under/worktank/ace-step/