Back to Home

Create AI Music With Stable Audio 3: Quick Start Guide

Create AI Music With Stable Audio 3: Quick Start Guide

Stability AI just dropped open weights for Stable Audio 3 — and it's a game-changer for anyone who wants to generate music and sound effects with AI on their own hardware. Whether you're a game developer needing instant SFX, a musician prototyping ideas, or just someone who wants to see what all the noise (pun intended) is about, this guide will get you up and running.

What Is Stable Audio 3?

Released on May 26, 2026, Stable Audio 3 is the latest generation of Stability AI's latent diffusion models for audio. It generates stereo audio at 44.1 kHz, supports variable-length outputs from a few seconds up to 6 minutes and 20 seconds, and even lets you do inpainting-style audio editing — yes, like Photoshop for sound. The open weights are available on Hugging Face for the small and medium variants, while the large model is available under an enterprise license.

Here's what you're working with:

  • small-music (459M params): Up to 2 minutes, music only. Lightweight enough for CPU inference.
  • small-sfx (459M params): Up to 2 minutes, sound effects only. Your new best friend for game jams.
  • medium (1.4B params): Up to 6m 20s, music + SFX. The sweet spot for most users.
  • large (2.7B params): Up to 6m 20s, music + SFX. Enterprise license, but top-tier quality.

Step 1: Set Up Your Environment

First, make sure you have Python 3.10+ and a machine with a CUDA-compatible GPU (though the small models can run on CPU if you're patient). Clone the official repository and install the dependencies:

git clone https://github.com/Stability-AI/stable-audio-3
cd stable-audio-3
pip install -r requirements.txt

You'll also need to accept the license on Hugging Face and log in:

pip install huggingface-hub
huggingface-cli login

Navigate to huggingface.co/stabilityai, find the Stable Audio 3 model you want, and accept the terms. After that, your local setup will have access to download the weights automatically on first run.

Step 2: Generate Your First Track

The simplest way to generate audio is through the provided inference script. Here's the basic command to generate 30 seconds of music:

python run.py \
  --model stabilityai/stable-audio-3-medium \
  --prompt "TrackType: Music, VocalType: Instrumental, Upbeat electronic track with warm pads and a driving bassline" \
  --duration 30 \
  --output my_first_track.wav

Important: Notice the prompt prefix. Models trained on AudioSparx require TrackType: Music, VocalType: Instrumental, for music or TrackType: SFX, for sound effects. Without it, your results will be... underwhelming.

For sound effects, try:

python run.py \
  --model stabilityai/stable-audio-3-medium \
  --prompt "TrackType: SFX, Heavy rain on a tin roof with distant thunder" \
  --duration 10 \
  --output rain_storm.wav

Step 3: Audio Inpainting — Edit Sound Like a Pro

This is where Stable Audio 3 really shines. You can take an existing audio file, mask a section, and have the model fill it in with new content that matches the surrounding context. Perfect for removing unwanted noises, extending tracks, or replacing sections:

python run.py \
  --model stabilityai/stable-audio-3-medium \
  --prompt "TrackType: Music, VocalType: Instrumental, acoustic guitar fingerpicking" \
  --input my_guitar_loop.wav \
  --mask_start 5.0 \
  --mask_end 10.0 \
  --output inpainted_guitar.wav

The --mask_start and --mask_end parameters define the region to replace in seconds. The model will analyze the surrounding audio and generate something that fits seamlessly.

Step 4: Use the Small Models for Fast Iteration

When you're experimenting with prompts and ideas, use the small models first — they're 459M parameters and run fast even on modest hardware. The medium model takes about 0.78 seconds to generate 2 minutes of audio on an H200, and the small models are even quicker at 0.45 seconds. Once you've nailed your prompt, switch to medium or large for the final render.

# Quick iteration with small-music
python run.py \
  --model stabilityai/stable-audio-3-small-music \
  --prompt "TrackType: Music, VocalType: Instrumental, Lo-fi hip hop beat with vinyl crackle" \
  --duration 20 \
  --output lofi_quick.wav

Under the Hood: Why It's So Fast

Stable Audio 3 uses a three-stage training pipeline (flow matching → distillation warmup → adversarial post-training) that lets it generate high-quality audio in just 8 inference steps — no classifier-free guidance needed. The secret sauce is the SAME autoencoder, which compresses 44.1 kHz stereo audio down to a latent representation at ~10.76 Hz, a 4096× reduction. This is what makes long-form generation tractable on consumer hardware.

Pro Tips

  • Prompt engineering matters: Be specific with genre, instruments, tempo, and mood. "Lo-fi hip hop with vinyl crackle and a mellow piano loop" beats "nice music" every time.
  • Use continuation for extensions: Generate a short loop, then use the inpainting continuation mode to extend it. This gives you longer, coherent tracks without running one massive generation.
  • Mix and match: Generate individual stems (drums, bass, pads) and layer them in your DAW. The models are good enough that layering can produce surprisingly professional results.
  • Sound design goldmine: The small-sfx model is incredible for generating unique UI sounds, footsteps, ambiences, and foley for games and videos.

Wrapping Up

Stable Audio 3 is one of the most capable open-weight audio generation models available right now, and the fact that it runs locally — with variable-length output, inpainting, and 8-step inference — makes it a genuinely practical tool for creators. Whether you're scoring a game, designing sound effects, or just having fun making AI-generated music, this is the model to beat in 2026.

Go fire up that terminal and make some noise. Literally.

Comments

No comments yet. Be the first to share your thoughts!