mlboydaisuke commited on
Commit
b6a2286
·
verified ·
1 Parent(s): 373cab6

Model card — zoo's first music generation

Browse files
Files changed (1) hide show
  1. README.md +70 -0
README.md ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: stability-ai-community
4
+ license_link: https://huggingface.co/stabilityai/stable-audio-open-small/blob/main/LICENSE.md
5
+ tags:
6
+ - core-ai
7
+ - apple
8
+ - on-device
9
+ - text-to-audio
10
+ - music-generation
11
+ - stable-audio
12
+ - diffusion
13
+ base_model:
14
+ - stabilityai/stable-audio-open-small
15
+ pipeline_tag: text-to-audio
16
+ ---
17
+
18
+ # Stable Audio Open Small — Core AI (on-device music generation)
19
+
20
+ **The model zoo's first MUSIC / AUDIO generation model for Apple Core AI.** Type a prompt, get ~11s
21
+ of 44.1 kHz stereo audio — generated entirely **on-device** on Apple Silicon. A community port of
22
+ [`stabilityai/stable-audio-open-small`](https://huggingface.co/stabilityai/stable-audio-open-small)
23
+ (Stability AI + Arm) to Core AI.
24
+
25
+ A latent **diffusion** text-to-audio model: a T5 text encoder conditions a DiT (diffusion transformer)
26
+ that denoises a latent over **8 rectified-flow steps**, then an Oobleck VAE decodes the latent to a
27
+ waveform. Distilled (ARC) for few-step generation, so it's fast.
28
+
29
+ ## What's in the bundle (`macos/`)
30
+
31
+ Three Core AI `.aimodel` bundles + a tiny host sampler loop:
32
+
33
+ | bundle | role | I/O |
34
+ |---|---|---|
35
+ | `sa_cond_fp16b` | T5-base encoder + number conditioner | `input_ids[1,64], attention_mask[1,64], seconds_norm[1] → cross_attn_cond[1,65,768], global_embed[1,768], cond_mask[1,65]` |
36
+ | `sa_dit_fp16` | diffusion transformer (run 8×) | `x[1,64,256], t[1], cross_attn_cond, global_embed, cross_attn_cond_mask → v[1,64,256]` |
37
+ | `sa_vae_fp16` | Oobleck VAE decoder | `latent[1,64,256] → audio[1,2,524288]` |
38
+
39
+ **Host loop** (`StableAudioRunner`): tokenize (T5, `t5_tokenizer/`) → conditioner → start from Gaussian
40
+ noise → 8-step rectified-flow euler `x = x + (t_next − t)·v` over the fixed schedule
41
+ `[1.0, .9944, .9845, .9579, .8909, .7455, .5125, .2739] → 0` → VAE decode → 44.1 kHz stereo wav.
42
+ No KV cache, no CFG (cfg_scale 1.0 — the model is ARC-distilled).
43
+
44
+ ## Performance (M4 Max, GPU)
45
+
46
+ | metric | value |
47
+ |---|---|
48
+ | 8-step DiT | ~200 ms (25 ms/step) |
49
+ | VAE decode | ~185 ms |
50
+ | **total** | **~0.4 s for ~11.9 s of audio (~30× real-time)** |
51
+ | size | fp16, ~1.0 GB (DiT 651M + cond 210M + VAE 149M) |
52
+
53
+ Numerics: each bundle engine-gated vs the reference at cos ≥ 0.9999; full pipeline reproduces the
54
+ reference audio exactly.
55
+
56
+ ## Roadmap
57
+
58
+ - iPhone (h18p) build — bundles AOT-compile; device RTF pending
59
+ - int8 (further size cut)
60
+ - a music-generation tab in the zoo app
61
+
62
+ ## Credits & license
63
+
64
+ A community **Core AI conversion** — all credit to **Stability AI** (and Arm) for
65
+ [Stable Audio Open Small](https://huggingface.co/stabilityai/stable-audio-open-small); T5 text encoder
66
+ by Google. This bundle is governed by the **[Stability AI Community License](https://huggingface.co/stabilityai/stable-audio-open-small/blob/main/LICENSE.md)**
67
+ (free for non-commercial use and for commercial use under \$1M annual revenue; review the license
68
+ before use). No retraining — conversion only.
69
+
70
+ Part of the [Core AI model zoo](https://github.com/john-rocky/coreai-model-zoo).