acestep-cpp API + Acestep DAW
ACE-Step 1.5 HTTP API emulator backed by acestep.cpp + Bun.
→ Full API reference: docs/API.md
ACE-Step-DAW (submodule) for Acestep.cpp

This repo includes ACE-Step-DAW as a git submodule at ACE-Step-DAW/.
Do not commit fixes inside the submodule. This project does not ship submodule changes — work under ACE-Step-DAW/ is lost on clone/CI. Implement DAW/API compatibility in src/ (and docs/tests here). See AGENTS.md.
Clone with the ACE-Step-DAW submodule (one level only — do not use --recursive here; upstream DAW may reference optional nested submodules without public URLs):
git clone <repo-url>
cd acestep-cpp-api
git submodule update --init ACE-Step-DAW
Demo (DAW UI + API): set ACESTEP_MODELS_DIR to a folder containing the usual Hugging Face / acestep.cpp .gguf files (flat directory). The server auto-detects LM, embedding, VAE, DiT base, DiT turbo, and turbo+shift by filename (see Models directory). You can still override any path with ACESTEP_LM_MODEL, etc. Then bundle binaries, build the DAW, start:
export ACESTEP_MODELS_DIR="$HOME/models/acestep"
bun run bundle:acestep # once per machine: fetch ace-lm / ace-synth
bun run daw:build
bun run start
# Startup logs list scanned roles + effective paths.
How to open the DAW UI
The API and the built DAW share one HTTP server. There is no separate “DAW port.”
bun run daw:build must have run successfully so ACE-Step-DAW/dist/index.html exists (the log line ACE-Step-DAW static (if built): … should point at that folder).
Start the server (bun run start or bun run src/index.ts).
In a browser open the root URL of that server — by default:
http://127.0.0.1:8001/
If you set ACESTEP_API_HOST / ACESTEP_API_PORT, use those instead (e.g. http://127.0.0.1:9000/).
The server serves the Vite dist/ for ordinary GET requests (e.g. /, /assets/…). Deep links to client routes still work because unknown paths fall back to index.html.
If GET / returns JSON Not Found, dist/ is missing or empty — run bun run daw:build again or set ACESTEP_DAW_DIST to a folder that contains a production index.html.
Static files are served from ACE-Step-DAW/dist unless you override ACESTEP_DAW_DIST.
The DAW’s production client calls /api/.... This server accepts the same routes with or without the /api prefix (e.g. /api/health and /health both work), so you can use the built UI on the same origin without Vite’s dev proxy.
Optional: set backend URL in the DAW to http://127.0.0.1:<port> (no /api) in Settings / localStorage['ace-step-daw-backend-url'] — then requests go to /release_task, /health, etc. directly.
| Env |
Purpose |
ACESTEP_DAW_DIST |
Absolute path to a Vite dist/ folder (defaults to <app-root>/ACE-Step-DAW/dist) |
Not supported here: task_type: stem_separation (returns 501 — needs the full Python ACE-Step stack). /format_input / /create_random_sample remain stubs for API shape compatibility.
DAW → acestep.cpp mapping: The bundled DAW sends the same fields as the upstream Python API (FormData + project defaults). This server normalizes several mismatches for lego (e.g. turbo-style guidance_scale / shift / inference_steps are rewritten to the acestep.cpp lego/base profile; empty prompt no longer hides caption; sub‑0.5s repaint windows are collapsed). See docs/API.md (lego_client_diffusion, ACESTEP_LEGO_CLIENT_DIFFUSION).
Building the DAW (no submodule edits): bun run daw:build runs vite build inside ACE-Step-DAW/ only. We intentionally do not run the submodule’s tsc -b step here, so vendored ACE-Step-DAW stays a pristine upstream checkout while still producing a usable dist/ for this API server. Never rely on local edits under ACE-Step-DAW/ for product behavior — they are not part of this repository. For the full upstream pipeline (typecheck + Vite), run npm run build inside the submodule yourself when you need it (that does not change what we ship).
CLI usage matches the upstream acestep.cpp README: MP3 by default (128 kbps, overridable), --wav for stereo 48 kHz WAV, plus optional --lora, --lora-scale, --vae-chunk, --vae-overlap, --mp3-bitrate.
Bundled acestep.cpp (v0.0.3)
bun run build downloads the correct asset from acestep.cpp releases v0.0.3 for the current OS/arch, flattens the full archive into acestep-runtime/bin/ (every file by basename in one directory — no nested lib/ tree), compiles dist/acestep-api, then copies acestep-runtime/ next to the executable.
The prebuilt archives include executables and all shared libraries needed to run them.
dist/
acestep-api # or acestep-api.exe
acestep-runtime/
bin/ # flat: entire prebuild payload
ace-lm # 5Hz LM (text + lyrics → audio codes)
ace-synth # DiT + VAE (audio codes → audio)
ace-server # standalone HTTP server
ace-understand # reverse: audio → metadata
neural-codec # VAE encode/decode utility
mp3-codec # MP3 encoder/decoder utility
quantize # GGUF requantizer
libggml*.so / *.dylib # GGML shared libraries (Linux / macOS)
*.dll # GGML DLLs (Windows)
(any other files from the release archive)
Run the API from dist/ (or anywhere) — the binary resolves siblings via dirname(execPath):
cd dist && ./acestep-api
Override layout with ACESTEP_APP_ROOT (directory that should contain acestep-runtime/) or ACESTEP_BIN_DIR (direct path to the folder containing ace-lm / ace-synth).
- Skip download:
SKIP_ACESTEP_BUNDLE=1 bun run build:binary-only
- Unsupported host (e.g. darwin x64 has no v0.0.3 zip): set
ACESTEP_BIN_DIR to your own build or use another machine.
Models directory (always via env)
Set ACESTEP_MODELS_DIR (or ACESTEP_MODEL_PATH / MODELS_DIR) to a directory containing .gguf files. The API scans that directory (non-recursive) and assigns:
| Detected role |
Typical filename hints |
| LM (5Hz) |
*5Hz*lm* / acestep LM gguf |
| Embedding |
*Embedding* (e.g. Qwen3-Embedding) |
| VAE |
*vae* (excluding embedding) |
| DiT base |
*v15-base* — required for lego mode (turbo does not support lego) |
| DiT turbo |
*v15-turbo* without shift |
| DiT turbo + shift |
*v15-turbo* with shift |
Overrides (optional): if set, these win over scan — ACESTEP_LM_MODEL, ACESTEP_EMBEDDING_MODEL, ACESTEP_DIT_MODEL, ACESTEP_VAE_MODEL. Paths can be absolute, relative to app root, or basenames under the models directory.
Logical DiT names (for model / DAW picker): auto-filled from scan into ACESTEP_MODEL_MAP unless you pass your own JSON in ACESTEP_MODEL_MAP: acestep-v15-base, acestep-v15-turbo, acestep-v15-turbo-shift3.
- Default logical model:
acestep-v15-base (lego-safe). Override with ACESTEP_DEFAULT_MODEL.
- Default
model when none selected: resolves to base DiT if present, else turbo.
task_type: lego: always uses base DiT, matching examples/lego.sh (phase 2). Request JSON defaults for lego follow examples/lego.json: inference_steps 50, guidance_scale 1.0, shift 1.0 when the client omits them.
Explicit example (same files as Hugging Face ACE-Step-1.5-GGUF) — optional if autodetect already finds them:
export ACESTEP_MODELS_DIR="$HOME/models/acestep"
export ACESTEP_LM_MODEL=acestep-5Hz-lm-4B-Q8_0.gguf
export ACESTEP_EMBEDDING_MODEL=Qwen3-Embedding-0.6B-Q8_0.gguf
export ACESTEP_DIT_MODEL=acestep-v15-base-Q8_0.gguf # optional; scan prefers base as default DiT
export ACESTEP_VAE_MODEL=vae-BF16.gguf
Per-request lm_model_path and ACESTEP_MODEL_MAP still use the same path resolution rules.
Multi-model support (GET /v1/models + per-request model)
GET /v1/models automatically scans ACESTEP_MODELS_DIR for .gguf files and returns them as the available model list. No extra configuration is required.
export ACESTEP_MODELS_DIR="$HOME/models/acestep"
# /v1/models will list every .gguf file found there, e.g.:
# ["acestep-v15-turbo-Q8_0.gguf", "acestep-v15-turbo-shift3-Q8_0.gguf"]
Use the discovered filename as the model value per-request:
curl http://localhost:8001/v1/models # discover available names
curl -X POST http://localhost:8001/release_task \
-H 'Content-Type: application/json' \
-d '{"prompt": "jazz piano trio", "model": "acestep-v15-turbo-shift3-Q8_0.gguf"}'
Optional: logical names via ACESTEP_MODEL_MAP — map friendly names to GGUF filenames:
export ACESTEP_MODELS_DIR="$HOME/models/acestep"
export ACESTEP_MODEL_MAP='{"acestep-v15-turbo":"acestep-v15-turbo-Q8_0.gguf","acestep-v15-turbo-shift3":"acestep-v15-turbo-shift3-Q8_0.gguf"}'
# Now use the short names: "model": "acestep-v15-turbo"
Optional: ACESTEP_MODELS as a filter/gate — restrict the list to a subset:
export ACESTEP_MODELS_DIR="$HOME/models/acestep"
export ACESTEP_MODELS="acestep-v15-turbo-Q8_0.gguf,acestep-v15-turbo-shift3-Q8_0.gguf"
# Only those two filenames appear in /v1/models even if more .gguf files exist
Generation parameters (inference_steps, guidance_scale, bpm, etc.) are always per-request and are never fixed by environment variables.
Run (source)
bun install
bun run bundle:acestep # once: fetch v0.0.3 binaries for this machine
export ACESTEP_MODELS_DIR="$HOME/models/acestep" # drop-in GGUFs; roles autodetected
bun run start
Add ACESTEP_*_MODEL overrides only if a file is not detected. For lego, ensure a *v15-base*.gguf