Instructions to use mlx-community/stable-audio-3-medium with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/stable-audio-3-medium with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download mlx-community/stable-audio-3-medium --local-dir stable-audio-3-medium
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
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
- -
Quantized
Model tree for mlx-community/stable-audio-3-medium
Base model
stabilityai/stable-audio-3-medium-base