Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
get_models
✓ from stable_audio_tools import get_models
Primary function to list available pretrained models.
create_model_from_config
✓ from stable_audio_tools.interface import create_model_from_config
Used to instantiate a model from a config or pretrained name.
ModelConfig
✓ from stable_audio_tools.interface import ModelConfig
Config dataclass for specifying model parameters.
get_pretrained_model_and_config
✓ from stable_audio_tools.interface import get_pretrained_model_and_config
Loads a pretrained model and its configuration.
Quickstart to list models and load a pretrained model. Full text-to-audio generation requires additional steps (text encoder, diffusion loop).
import torch
import soundfile as sf
from stable_audio_tools import get_models
from stable_audio_tools.interface import get_pretrained_model_and_config
# List available models
models = get_models()
print("Available models:", list(models.keys()))
# Use a stable audio model (replace with actual model name from list)
model_name = "stable-audio-open-1.0" # example, check get_models()
model, config = get_pretrained_model_and_config(model_name)
# Generate audio: text-to-audio (simplified, requires proper sampling setup)
# Create a random latent and decode (demo only)
device = "cuda" if torch.cuda.is_available() else "cpu"
model = model.to(device)
# Note: Full generation requires T5 text encoder and diffusion loop
print("Model loaded successfully. Refer to official docs for full inference.")
Upgrade
Version history
0.0.20latest on PyPI · released May 20, 2026
Audit
Dependencies
torchrequiredCore deep learning framework required for model loading and inference.
einopsrequiredUsed for tensor operations.
transformersrequiredRequired for T5 text encoder and other model components.