Nekochu commited on
Commit
9d2d424
·
1 Parent(s): 2bd2612

add full README with API docs, MCP, CLI, architecture

Browse files
Files changed (1) hide show
  1. README.md +163 -2
README.md CHANGED
@@ -1,10 +1,171 @@
1
  ---
2
- title: ACE Step CPU
3
  emoji: 🎵
4
  colorFrom: indigo
5
  colorTo: yellow
6
  sdk: docker
7
  pinned: false
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  ---
9
 
10
- ACE-Step 1.5 XL Music Generation (CPU) powered by acestep.cpp GGUF inference.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: ACE-Step 1.5 XL Music Generation (CPU)
3
  emoji: 🎵
4
  colorFrom: indigo
5
  colorTo: yellow
6
  sdk: docker
7
  pinned: false
8
+ license: mit
9
+ tags:
10
+ - music-generation
11
+ - ace-step
12
+ - gguf
13
+ - lora
14
+ - training
15
+ - cpu
16
+ - mcp-server
17
+ short_description: ACE-Step 1.5 XL - CPU music generation + LoRA training
18
+ models:
19
+ - ACE-Step/Ace-Step1.5
20
+ startup_duration_timeout: 2h
21
  ---
22
 
23
+ # ACE-Step 1.5 XL Music Generation (CPU)
24
+
25
+ **GGUF inference + LoRA training** on free CPU Spaces. Powered by [acestep.cpp](https://github.com/ServeurpersoCom/acestep.cpp).
26
+
27
+ ## Features
28
+
29
+ - **Music Generation** - Text/lyrics to stereo 48kHz MP3 via GGUF quantized models
30
+ - **LoRA Training** - Fine-tune on your own audio (Side-Step engine, Adafactor optimizer)
31
+ - **Multiple LM Sizes** - 0.6B / 1.7B / 4B language models (on-demand download)
32
+ - **CPU Only** - Runs on free HuggingFace Spaces (2 vCPU, 18GB RAM)
33
+
34
+ ## Music Generation
35
+
36
+ 1. Enter a music description (e.g. "upbeat electronic dance music")
37
+ 2. Enter lyrics or check **Instrumental**
38
+ 3. Adjust BPM, duration, steps, seed
39
+ 4. Select LM model (1.7B default, fastest on CPU)
40
+ 5. Select LoRA adapter if trained
41
+ 6. Click **Generate Music**
42
+
43
+ **Timing:** ~270s for 10s audio with 1.7B LM, 8 steps.
44
+
45
+ ## LoRA Training
46
+
47
+ 1. Go to **Train LoRA** tab
48
+ 2. Upload audio files (WAV/MP3, max 240s each)
49
+ 3. Set LoRA name, epochs (1-10), rank (default 16)
50
+ 4. Click **Train** - ace-server stops during training, restarts after
51
+ 5. Use **Cancel** to stop early (saves checkpoint)
52
+ 6. Trained adapter appears in the LoRA dropdown for inference
53
+
54
+ **Timing:** ~170s preprocessing + ~10s/epoch on CPU.
55
+
56
+ ## Models
57
+
58
+ | Component | GGUF | Size |
59
+ |-----------|------|------|
60
+ | DiT (music) | acestep-v15-xl-turbo-Q4_K_M | 2.8 GB |
61
+ | LM (captions) | acestep-5Hz-lm-1.7B-Q8_0 | 1.7 GB |
62
+ | Text Encoder | Qwen3-Embedding-0.6B-Q8_0 | 0.75 GB |
63
+ | VAE | vae-BF16 | 0.32 GB |
64
+
65
+ LM alternatives (on-demand download): 0.6B Q8_0 (slow), 4B Q5_K_M (best quality, ~515s).
66
+
67
+ ---
68
+
69
+ ## API
70
+
71
+ ### Python Client - Generate Music
72
+
73
+ ```python
74
+ from gradio_client import Client
75
+
76
+ client = Client("WeReCooking/ACE-Step-CPU")
77
+
78
+ result = client.predict(
79
+ caption="upbeat electronic dance music",
80
+ lyrics="[Instrumental]",
81
+ instrumental=True,
82
+ bpm=120,
83
+ duration=10,
84
+ seed=-1, # -1 = random
85
+ steps=8, # 1-32, fewer = faster
86
+ lora_select="None (no LoRA)", # or trained adapter name
87
+ lm_model_select="acestep-5Hz-lm-1.7B-Q8_0.gguf",
88
+ api_name="/generate"
89
+ )
90
+ print(result) # (audio_path, status_message)
91
+ ```
92
+
93
+ ### Python Client - Train LoRA
94
+
95
+ ```python
96
+ from gradio_client import Client, handle_file
97
+
98
+ client = Client("WeReCooking/ACE-Step-CPU")
99
+
100
+ result = client.predict(
101
+ audio_files=[handle_file("song.mp3")],
102
+ lora_name="my-style",
103
+ epochs=3,
104
+ lr=0.0001,
105
+ rank=16,
106
+ api_name="/train_lora"
107
+ )
108
+ print(result) # (log_text, train_btn, cancel_btn)
109
+ ```
110
+
111
+ ### Python Client - Server Status
112
+
113
+ ```python
114
+ result = client.predict(api_name="/server_status")
115
+ print(result) # JSON with model info
116
+ ```
117
+
118
+ ### MCP (Model Context Protocol)
119
+
120
+ This Space supports MCP for AI assistants (Claude Desktop, Cursor, VS Code).
121
+
122
+ **MCP Config:**
123
+ ```json
124
+ {
125
+ "mcpServers": {
126
+ "ace-step": {"url": "https://werecooking-ace-step-cpu.hf.space/gradio_api/mcp/"}
127
+ }
128
+ }
129
+ ```
130
+
131
+ ---
132
+
133
+ ## CLI Usage
134
+
135
+ ```bash
136
+ # Generate music
137
+ python app.py "upbeat electronic dance music" --duration 10 --steps 8 --format mp3
138
+
139
+ # With lyrics
140
+ python app.py "pop ballad" --lyrics "Hello world\nThis is a test" -d 30
141
+
142
+ # With LoRA adapter
143
+ python app.py "jazz piano" --adapter my-style --seed 42
144
+
145
+ # Custom server URL
146
+ python app.py "ambient" --server http://localhost:8085
147
+ ```
148
+
149
+ ---
150
+
151
+ ## Architecture
152
+
153
+ ```
154
+ ace-server (C++ GGUF) Gradio UI (Python)
155
+ /lm -> LM generate app.py
156
+ /synth -> DiT + VAE train_engine.py (Side-Step)
157
+ /health |
158
+ /props +-- preprocess_audio()
159
+ /job +-- train_lora_generator()
160
+ ```
161
+
162
+ - **Inference:** GGUF via [acestep.cpp](https://github.com/ServeurpersoCom/acestep.cpp) HTTP API
163
+ - **Training:** PyTorch via ported [Side-Step](https://github.com/koda-dernet/Side-Step) engine
164
+ - Training stops ace-server (free RAM), restarts after with new adapters
165
+
166
+ ## Credits
167
+
168
+ - [ACE-Step 1.5](https://github.com/ace-step/ACE-Step-1.5) - Model architecture
169
+ - [acestep.cpp](https://github.com/ServeurpersoCom/acestep.cpp) - GGUF inference engine
170
+ - [Side-Step](https://github.com/koda-dernet/Side-Step) - Training engine (ported)
171
+ - [Serveurperso/ACE-Step-1.5-GGUF](https://huggingface.co/Serveurperso/ACE-Step-1.5-GGUF) - Quantized models