techfreakworm commited on
Commit
317bd6f
·
unverified ·
1 Parent(s): 99375d0

docs(plan): record acestep api correction at task c1

Browse files

The plan's Task C1 originally assumed a clean
'from ace_step import ACEStepPipeline' / from_pretrained pattern. That
entry point does not exist in the installed acestep package (apple-silicon
fork or upstream). Real API is the AceStepHandler + LLMHandler +
generate_music three-tuple, wrapped by ace_pipeline.ACEStepStudio.

The original code snippet in Task C1 is preserved for historical context
but readers should consult the live ace_pipeline.py (commit 99375d0) for
the canonical implementation.

docs/superpowers/plans/2026-05-18-ace-music-studio.md CHANGED
@@ -962,7 +962,24 @@ git commit -m "feat(app): bootstrap gradio blocks with brutalist mono chrome"
962
 
963
  **Goal:** Click "Generate" on the Generate tab → ACE-Step pipeline produces a real WAV file. No LoRA stacking, no Demucs, no Lyrics LM. Validates the inference path on M5 Max.
964
 
965
- ### Task C1: `ace_pipeline.py` — `ACEStepPipeline` lazy wrapper
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
966
 
967
  **Files:**
968
  - Modify: `ace_pipeline.py`
 
962
 
963
  **Goal:** Click "Generate" on the Generate tab → ACE-Step pipeline produces a real WAV file. No LoRA stacking, no Demucs, no Lyrics LM. Validates the inference path on M5 Max.
964
 
965
+ ### Task C1: `ace_pipeline.py` — `ACEStepStudio` lazy wrapper
966
+
967
+ **⚠ API CORRECTION (commit `99375d0`, 2026-05-18).** The plan originally assumed `from ace_step import ACEStepPipeline` with a `from_pretrained` entry point. That API does **NOT** exist in the installed `acestep` package (both upstream and the Apple-Silicon fork). The real API is:
968
+
969
+ ```python
970
+ from acestep.handler import AceStepHandler
971
+ from acestep.llm_inference import LLMHandler
972
+ from acestep.inference import GenerationParams, GenerationConfig, generate_music
973
+
974
+ dit = AceStepHandler()
975
+ dit.initialize_service(project_root=..., config_path="acestep-v15-xl-sft", device="mps")
976
+ lm = LLMHandler()
977
+ lm.initialize(checkpoint_dir=..., lm_model_path="acestep-5Hz-lm-0.6B", backend="vllm", device="mps")
978
+ result = generate_music(dit, lm, GenerationParams(...), GenerationConfig(...))
979
+ # result.audios[0]["path"] is the WAV file
980
+ ```
981
+
982
+ To keep `backend.py` and `modes.py` clean, `ace_pipeline.py` wraps both handlers in a single `ACEStepStudio` class exposing `generate(params: dict) -> str`. `get_pipeline()` returns the lazy singleton wrapper. Module name is `acestep` (no underscore) — not `ace_step`. Two HF model paths needed: `ACE-Step/acestep-v15-xl-sft` (DiT, ~16 GB) + `ACE-Step/acestep-5Hz-lm-0.6B` (LM planner, ~1.4 GB), placed under `./checkpoints/<config>/`. Read the committed `ace_pipeline.py` for the actual implementation; the code block below this header is the ORIGINAL plan version and is kept only for historical context.
983
 
984
  **Files:**
985
  - Modify: `ace_pipeline.py`