Repository navigation
Releases
Releases · kabatin/ace-step-api
v0.1.1
ace-step-api setup: install the engines with one command, the same command as the other GPU servers.
setup [--models ace-step,minimax-music3] [--check] [--yes] [--json] [--lan] [--service] [--port N] [--prefix DIR] [--label-suffix S] [--coordinate-with NAME=HEALTH_URL ...].ace-stepclones the
Apple Silicon port at a pinned commit,uv syncs it and fetchesACE-Step/Ace-Step1.5at a pinned revision;
minimax-music3makes a Python 3.12 venv withmlx-audio==0.5.9and downloads
mlx-community/MiniMax-Music3-mxfp8at a pinned revision. Either works alone. Pins live in
setup/pins.py.--checkchanges nothing and reports the Mac (arm64, macOS, RAM, free disk, git/uv), each component's
state and download size, and the launchd agent.--jsonprints one object on stdout; progress goes to
stderr. Exit 0 ok, 1 failed, 2 bad arguments, 3 needs confirmation (no terminal and no--yes).- Argument errors (also argparse's own, a bad
--label-suffix, a--label-suffixwithout--port, a
--lantoken or a peer URL/token from the environment that the server would reject) exit 2 before
anything runs; with--jsonas one complete report. Anunsupportedcomponent fails the run only when
named in--models. Setup runs on a config the server rejects, so it can repair it. - Idempotent; a stalled download is interrupted and resumed; free disk is checked before downloading.
- The config is merged, never pruned: only missing keys are added (
--lan/--portset what they ask
for), written atomically with mode 0600.--lantakes the token fromACE_STEP_API_TOKEN, the config,
or generates one, and never prints it.--coordinate-withadds[[coordinate_with]]entries (peer
token fromACE_STEP_API_COORD_TOKEN_<NAME>). --servicewrites~/Library/LaunchAgents/com.github.kabatin.ace-step-api[.<suffix>].plist, reloads it
with launchctl (waiting for the old job to go, retrying a busy bootstrap) and waits up to 60 s for
/v1/health. Directories setup creates are 0700; a symlinked config is written through.
Second engine: MiniMax Music 3, ported from the multi-engine design of sfx-api.
- Workflow
minimax-music3: theace-step-1.5body and rules (prompt ≤ 1000 chars, lyrics ≤ 4000,
instrumental,duration_sec10–240,count1–4, track i usesseed + i) run by MiniMax Music 3
(mlx-community/MiniMax-Music3-mxfp8through mlx-audio, 30 steps). Empty lyrics mean instrumental, as
forace-step-1.5(the engine gets its[instrumental]marker).duration_secis an upper bound:
a track that ends early succeeds with its real length. Output checked as 16-bit PCM 44.1 kHz stereo.
Capabilities addupper_bound,prompt_and_lyrics_max_tokens(5000) andattribution
(MiniMax-Music3, which the licence asks commercial products to display). - Backend
minimax([backends.minimax]:python,hf_home,model,resident_idle_seconds,
start_timeout_s,stop_grace_s, estimate knobs): a resident worker in the MiniMax venv's Python
(-P, offline, same line protocol), progress estimated from elapsed time (the engine reports none),
a hot track turned down to −1 dBFS as a whole (no limiter). Estimates30 + (10 + 9.5 × duration)
s per job track, from ~8.3–9.4 s per second of audio measured outside the server; peak ~24 GB. - Engine router: each request names its engine; one engine in memory at a time (the other is unloaded
before a job starts); startup, shutdown, recover and the peer check reach both. /v1/healthgainsworkflows: {id: {available, loaded, reason}}(additive). A workflow whose engine
is not installed or lacks model files answers503 workflow_unavailable; the other keeps working.
servestarts when at least one engine is available (warning for the other),doctor --smokeruns one
short instrumental per available workflow,workflowsshows each engine's availability.- ACE-Step: unchanged contract (body, limits, results, seed rule, capabilities). Its worker state stays
indata_dir/engine/; MiniMax's isdata_dir/engine/minimax/. ACE-Step now refuses a job up front
(backend_unavailable) when its checkout, Python or models are missing, instead of failing the load.
The resident engine'sloadedstate is read without waiting for a model load in progress; a file
system error while checking an install makes its workflow unavailable instead of failing health. - A worker that survives SIGKILL is tracked: no engine loads next to it (the job fails as
engine_unstoppable, retryable) until it exits; its pid file is kept so a restart reaps it. - Input an engine refuses (MiniMax: prompt + lyrics over 5000 tokens, zero audio frames) fails the job
asinvalid_params, not retryable, and keeps the worker loaded. Job errors can now be
non-retryable when the backend says so. - The MiniMax worker releases MLX's buffer cache after every track.
doctorreports a missing engine as warnings while another engine is available; it fails only when
no engine can generate.
Install / update
uv tool install git+https://github.com/kabatin/ace-step-api@v0.1.1 # new install
uv tool install --reinstall git+https://github.com/kabatin/ace-step-api@v0.1.1 # update an existing installThe config and its token are kept. Restart the server after updating, once /v1/health shows "running": 0:
launchctl kickstart -k gui/$(id -u)/com.github.kabatin.ace-step-api for the LaunchAgent, or run ace-step-api setup --service again.
ixa 0.8.3 and later do this for you: pnpm ixa ai install upgrades an older ace-step-api before checking what is installed.
Full changes: v0.1.0...v0.1.1
v0.1.0
First version, built on the job server of klein-api 0.1.0.
- HTTP job API per docs/api.md: health (vpipe-api / klein-api compatible, plus
waiting_for_peer), capabilities, workflow listing with JSON Schemas, typed submit route, job status
with progress over all tracks, queue position,waiting_for, estimate and timings (incl.
coordination_seconds,load_seconds), per-index WAV download, cancel. One error envelope. - Workflow
ace-step-1.5:prompt(style tags),lyrics(empty = instrumental),duration_sec
10–240,instrumental,seed(track i usesseed + i, 0 … 2³²−1),count1–4; every track read
back as 16-bit PCM stereo WAV before the job succeeds, real lengths in the result; sung language taken
from the lyrics' script. - Backend
acestep: a resident worker in the ACE-Step checkout's own Python (-P, own process group,
requests on stdin, replies on a private pipe, offline), released when idle, when a coordinated server
is busy, after failed jobs and on shutdown; leftovers reaped after a crash. Works with the official
checkout and the Apple Silicon port (mlx_dit,lm_backendswitches). - Output level: whole-track gain when a track runs hot, then a −1 dBFS look-ahead limiter.
- Coordination with vpipe-api and klein-api; a head job waiting for a peer is reported as
waiting_for_peer, so two servers that wait for each other cannot deadlock.
Install
uv tool install git+https://github.com/kabatin/ace-step-api@v0.1.0Setup, configuration and the LaunchAgent: see the README.