stable-audio-tools needs unwrap_model.py before inference, and its --strategy default names a flag with a hyphen
Generative models for conditional audio generation
At a glance
- What is it?
- stable-audio-tools is the training and inference code behind Stability AI's audio models, a Python package with three optional dependency groups and a lockfile. The interesting parts are the checkpoint lifecycle, the argument names, and where torch is resolved from.
- Who is it for?
- The repository fits a research team that already has a dataset, a model configuration and hardware, and wants to train or fine-tune conditional audio models from an implementation rather than from a notebook. It does not fit someone who wants to run a model this afternoon, because the demo needs gated weights, the training path needs a hosted logging account, and the performance path needs a second installation step.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 21 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.
Star history
- Stability-AI/stable-audio-tools3,919 ★ · +51
| Repository | 2026-09-28 | 2026-11-22 |
|---|---|---|
| Stability-AI/stable-audio-tools | 3.9k | 3.9k |
51 Stars in the last 55 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Three checkpoint flags, and one of them means different things in each script
Four arguments take a checkpoint, and the page never lines them up in one place.
For the Gradio script, a checkpoint is a local file and must be unwrapped. For the training script, passing a checkpoint to continue a run expects the wrapped form, while starting a fresh run from a pre-trained model expects the unwrapped form under a different flag. A third flag loads a pretransform, which the page says is used in model types such as latent diffusion to load a pre-trained autoencoder, and which also requires an unwrapped checkpoint.
So the same name appears in both scripts with opposite requirements, and a reader who reads the training section then copies the argument into the demo script has a checkpoint the demo cannot load. Nothing on the page flags it, because the two sections are three screens apart.
The Gradio script also has an argument for a model on the hub rather than a file, which it says takes precedence over the checkpoint-file form and prioritises a safetensors file over a legacy checkpoint file when both are in the repository.
The training checkpoint carries the discriminator, the EMA copies and the optimiser state
The project uses PyTorch Lightning for multi-GPU and multi-node training, and it wraps a model during training in what the page calls a training wrapper: a module that holds everything needed only while training.
What is in it is named. Discriminators for autoencoder models, exponential moving average copies of the models, and all of the optimiser state.
The consequence is stated as a problem rather than a feature: the checkpoint files created during training include the wrapper, which greatly increases their size. So a training run produces artefacts that are large, and the artefact you actually want is not one of them.
That is what a second script at the repository root is for. It takes a wrapped checkpoint and writes a new one containing only the model. Unwrapped checkpoints are then required in three situations: by the inference scripts, when using a model as a pretransform for another model such as an autoencoder in a latent diffusion setup, and when fine-tuning a pre-trained model with a modified configuration, which the page calls partial initialisation.
So the workflow has a mandatory step between training and use, and nothing in the training command does it for you.
The documented default for --strategy names a flag that does not exist
The additional training arguments are listed with their defaults, and most of the defaults are sensible. Checkpoints every ten thousand steps. A batch size of eight, with the advice to raise it to whatever the video memory allows. One GPU and one node. Gradient accumulation available for effectively larger batches on smaller cards.
Then the strategy argument, whose default is written as distributed data parallel if a flag spelled with an underscore is above one, and nothing otherwise.
The argument named in that default is not the name of any flag on the list. The GPU count flag is written with a hyphen between its two words, and the default refers to a different spelling of it, so anyone trying to reproduce the rule in a script or a wrapper has to guess which was meant. Setting it explicitly to the DeepSpeed value switches on ZeRO Stage 2, which is the only distributed strategy besides the default that the page names.
The precision argument defaults to sixteen, and the page does not list the other values it takes.
Three invocation styles, and the short training example omits a required argument
The install section is consistent: a dependency sync for inference, another adding a training group, and a third adding both that and the interface group.
$ uv sync
# Training
$ uv sync --extra train
# Everything (training + Gradio UI)
$ uv sync --extra train --extra uiRunning the scripts is supposed to go through the same tool, with the training script and the interface script each given as a command.
After that the page switches styles. The interface example is given as a direct call to the script with python3, not through the runner. So is the training example in the training section, which passes a dataset configuration, a model configuration and a run name.
And the first of those, the one under the runner, passes only a dataset configuration followed by an ellipsis.
The prerequisites section says a model configuration file and a dataset configuration file are both needed before a training run. So the one example that looks shortest is missing the argument the prerequisites call required, and the ellipsis may or may not be covering it.
The alternative to the whole tool is a single pip install with the training group in brackets, which is the shortest documented path to the training code.
Torch is resolved from a CUDA 12.6 index on Linux x86_64 and from the default index elsewhere
The package manifest pins the runtime hard: torch and torchaudio at one exact version each, matching. The page's prose is looser, saying that version 2.5 or later is required, for Flash Attention and Flex Attention support.
The more interesting part is where those wheels come from. A named package index is declared, pointing at the PyTorch download host for a specific CUDA release, marked explicit so it is not merged with the default index. Then two source mappings say that torch and torchaudio resolve from that index only under a marker requiring Linux and the x86_64 machine architecture.
So on a Mac, or on Linux on any other architecture, the same pins resolve from the ordinary package index, and on Linux x86_64 they resolve from a CUDA 12.6 wheel host. The lockfile at the root is what makes that reproducible.
The interpreter is also pinned at both ends. The manifest requires a minimum of 3.10 and a maximum below 3.11, a repository file records the version, and the page says development is done in 3.10. So an environment on 3.11 or 3.12 cannot install the package at all.
Training needs a hosted logging account, and the attention implementation is not a dependency
The training prerequisites are two configuration files and a third-party account. The page says the training code requires a Weights and Biases account to log the training outputs and the demos, and gives a login command for it.
That places a network service in the path of every training run, and the run name argument exists to set the project name on that service. The client library is in the training dependency group at a pinned version, so it is not in the base install.
The second prerequisite is less obvious. The page recommends Flash Attention for performance and says to follow the installation instructions in that project's own repository after running the dependency sync.
So the recommended performance path is an out-of-band install. It is not a dependency, not an extra, and not installed by the sync, and it has to be done in the right order or the environment changes underneath the run.
The version constraint that the page attaches to PyTorch exists for this and for Flex Attention. The one version the manifest pins is 2.7.1, which satisfies the stated floor.
The demo needs gated weights and can be published to a public link
The interface section is short and it starts with a condition. To run the interface against the open model you have to accept its terms on the model hub first. The page says so before giving the command.
So the first run is gated by a click somewhere else, and the page does not say what happens if you skip it, only that the terms have to be accepted.
The interface arguments include one that creates a publicly shareable link for the demo, and a pair that set a login for it. Those two are independent, so a shared demo is one flag away from being unauthenticated and reachable by anyone with the link. That is the project's own demo flag rather than a vulnerability, and it is worth knowing before you use it on a machine you care about.
The last flag halves the model weights. Nothing on the page says what that does to output quality.
The model types the configuration files accept are six: autoencoder, two unconditional and two conditional diffusion variants including an inpainting one, a diffusion autoencoder, and a language model. The sentence describing the sample size property stops mid-word.
The root has three scripts and the page documents two of them
The repository root is small and mostly accounted for. Two scripts, one for training and one for stripping a training wrapper, are the subject of the page. A third, for pre-encoding, sits beside them and is not mentioned anywhere on it.
A file of defaults sits at the root too, and the training script takes it as an argument, required if you run from anywhere other than the root, which is a quiet way of saying the script is not relocatable without passing the path.
Then the supporting files: an interpreter version file, a lockfile, a directory of third-party licence texts, a licence file, a gitignore, a docs directory, a scripts directory, the package directory and the configuration for the model and dataset files.
The version in the package manifest is 0.0.20 and the repository has no GitHub releases, so the package version and the tag namespace are separate things, and the documented install is a clone plus a sync rather than an install from an index. A user who wants a pinned old build has neither a tag to name nor a documented way to ask the index for one.
Editorial conclusion
The repository fits a research team that already has a dataset, a model configuration and hardware, and wants to train or fine-tune conditional audio models from an implementation rather than from a notebook. It does not fit someone who wants to run a model this afternoon, because the demo needs gated weights, the training path needs a hosted logging account, and the performance path needs a second installation step. Three things to settle first. Which checkpoint you have, wrapped or unwrapped, because three flags accept them and the page does not say which script means what. Which Python you run, since the package refuses anything above 3.10. And where torch comes from, since on Linux x86_64 it is resolved from a CUDA 12.6 wheel index rather than the default one.
Frequently asked questions
How do I install stable-audio-tools?
Clone the repository, install uv if you have not, then run a sync for inference only, a sync with the training extra, or a sync with both the training and interface extras. A single pip install with the training extra in brackets is offered as the alternative, and Flash Attention has to be installed separately afterwards.
Do I have to unwrap a checkpoint before using it for inference?
Yes. Checkpoints written during training include a training wrapper holding discriminators, moving-average copies of the models and the optimiser state, which the page says greatly increases their size. A script at the repository root strips the wrapper, and the inference scripts require the result.
What Python version does stable-audio-tools support?
The package manifest requires a minimum of 3.10 and a maximum below 3.11, a repository file records the interpreter version, and the page says development is done in Python 3.10. PyTorch is pinned to one exact version for both torch and torchaudio.
Does stable-audio-tools need Weights and Biases?
For training, yes. The page lists a Weights and Biases account among the training prerequisites, to log training outputs and demos, and gives a login command. The client library is in the training dependency group rather than the base install.
What model types can a stable-audio-tools configuration define?
Six: autoencoder, unconditional diffusion, conditional diffusion, conditional diffusion with inpainting, a diffusion autoencoder, and a language model. The configuration files are JSON, and the page states that the model configuration carries both what is needed to load a model and the training settings.
Official sources
Where developers are discussing it
Posts on Hacker News, dev.to and Lobsters that link to this repository, found by our scan of those communities. 0 in the last 30 days; newest first.
- The Stack I'd Need for Claude to Direct a Whole YouTube Video in Blenderdev.to · Oct 9, 2026 · 24 points · 1 comments
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/stability-ai-stable-audio-tools)Star history chart for your README
[](https://hysenlabs.com/projects/stability-ai-stable-audio-tools)Was this useful?