stable-audio-3-medium

Powered by Stability AI

Stable Audio 3 medium in MLX format for mlx-audio. It generates stereo 44.1 kHz music and sound effects from a text prompt, up to 380 seconds: a T5Gemma text encoder, a 24-layer diffusion transformer sampled in 8 ping-pong steps, and the SAME-L decoder. The diffusion transformer is stored in float16, the decoder in float32.

Use

Stable Audio 3 support in mlx-audio is in review and ships in its next release.

pip install -U mlx-audio

python -m mlx_audio.music.generate \
    --model mlx-community/stable-audio-3-medium \
    --caption "Warm lofi hip hop with dusty drums, mellow Rhodes piano and deep bass, 85 BPM" \
    --duration 30 \
    --seed 11 \
    --output lofi.wav
from mlx_audio.music import load

model = load("mlx-community/stable-audio-3-medium")

for result in model.generate(
    text="Warm lofi hip hop with dusty drums, mellow Rhodes piano and deep bass, 85 BPM",
    duration=30,
    steps=8,
    seed=11,
):
    print(result.audio.shape, result.sample_rate)

--cfg-scale defaults to 1 (guidance off). A larger value enables --negative-prompt and doubles the model calls per step.

Source

Converted from the MLX export in stabilityai/stable-audio-3-optimized, revision 30cb2644da54bfa63275d1bc7f1fa67fc718680f, with model_config.json and the text encoder from stabilityai/stable-audio-3-medium-base. The conversion script, mlx_audio/music/models/stable_audio_3/convert.py, comes with medium support in mlx-audio. config.json and model_config.json are the medium-base model config, from which mlx-audio reads only the model sizes and sample settings. See NOTICE for what changed.

License

The model is licensed under the Stability AI Community License (LICENSE.md). If you distribute it or a derivative work, you must provide a copy of that license, keep the attribution in NOTICE, and display "Powered by Stability AI". Use is subject to Stability AI's acceptable use policy, and the license sets terms for commercial use.

The T5Gemma text encoder in t5gemma-b-b-ul2/ is subject to the Gemma Terms of Use (LICENSE_GEMMA.md, ai.google.dev/gemma/terms), including the use restrictions in their Section 3.2 and the Gemma Prohibited Use Policy.

Downloads last month
-
Safetensors
Model size
2B params
Tensor type
F32
ยท
F16
ยท
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for mlx-community/stable-audio-3-medium