Audio generation model
Self-host AudioGen: 1.5B text-to-sound, one 24GB card end to end
AudioGen is Meta FAIR's text-to-sound model. It does not write music and it does not do vocals — it turns descriptions like "heavy rain on a metal roof" or "a siren approaching from a distance" into 16kHz waveforms. The only public checkpoint is facebook/audiogen-medium at 1.5B parameters, and the docs ask for at least 16GB of VRAM.
AudioGen · self-hosted
Clear up the usual confusion first: AudioGen is not MusicGen. Same audiocraft repo, same EnCodec tokenizer, nearly the same Transformer code — completely different training data. AudioGen was trained on AudioSet, the BBC sound effects library, AudioCaps, Clotho v2, VGG-Sound and FSD50K, so what comes out is footsteps, breaking glass, birdsong, machinery hum. Ask it for a melody and you get noise. Music goes to MusicGen; sound design, game ambience and video foley is what AudioGen is the open-source starting point for.
The checkpoint you can actually download is AudioGen v2, rebuilt in July–August 2023: Meta ported it onto MusicGen's architecture, stretched the generation window from the paper's 5 seconds to 10, retrained EnCodec on environmental audio, and dropped the audio-mixing augmentation from the paper. The model card reports FAD 1.77 and KL 1.58 on AudioCaps, and Meta states plainly that these are not the original models used to report numbers in the AudioGen publication. The stack is EnCodec with 4 codebooks, 2048 entries each, at a 50Hz frame rate, producing 16kHz mono.
What actually blocks deployment is not VRAM, it is dependencies. audiocraft's requirements.txt pins torch to exactly 2.1.0, caps torchaudio below 2.1.2, and drags along torchvision==0.16.0, torchtext==0.16.0, xformers<0.0.23, numpy<2.0.0, av==11.0.0 and spacy==3.7.6. The last PyPI release, 1.3.0, landed in June 2024; the last repo commit was March 2025; the Hugging Face weights were last touched in March 2024. This is a frozen stack, and the direct consequence is counterintuitive: the newest GPUs are hostile to it and older ones fit perfectly. This page covers every trap and every card choice.
01 —
Which AudioGen versions exist, and which one you can actually download
Meta published exactly one checkpoint — everything else is a same-stack alternative, so don't let the model names mislead you
| Version | Parameters | VRAM | Context | Notes |
|---|---|---|---|---|
| facebook/audiogen-medium | 1.5B | Official: 16GB minimum; state_dict.bin 3.68GB + EnCodec 236MB + T5 text encoder ~0.9GB | 10s native window; longer via sliding-window continuation (extend_stride defaults to 2s) | The only official release, full stop. No small, no large. Every other similarly named repo on Hugging Face is a community mirror or third-party fine-tune. Code is MIT, weights are CC-BY-NC-4.0. |
| AudioGen v1 (ICLR 2023 paper) | not released | n/a | 5s | The original models from Kreuk et al., arXiv:2209.15352, September 2022. The weights were never published, so any reproduction of the paper's numbers will not match the checkpoint you can download. |
| facebook/audio-magnet-medium | 1.5B | Same class as audiogen-medium; the official 16GB-minimum guidance applies | 10s | Ships in the same audiocraft install. Non-autoregressive masked decoding — the MAGNeT paper reports 7x faster than the autoregressive baseline. The easiest swap if AudioGen's token-by-token decode feels slow. |
| facebook/audio-magnet-small | 300M | One fifth the parameters of medium; roughly 0.6GB of fp16 weights | 10s | The cheapest tier for sound-effect generation. Good for real-time auditioning and bulk prompt screening, then hand the winners to a medium model for the final render. |
| Stable Audio Open 1.0 (comparison, not Meta) | ~1B | Diffusion architecture, so its memory curve behaves nothing like autoregressive AudioGen | Up to 47s | 44.1kHz stereo, trained entirely on CC-licensed audio from Freesound and the FMA, under the Stability AI Community License. Better fidelity and far friendlier licensing than AudioGen, at the cost of leaning more musical. |
02 —
The most economical GPU for running AudioGen
Dependencies are locked to torch 2.1.0, so card selection inverts the usual rule: do not chase the newest architecture
Auditioning, prompt tuning, single 10s renders
RTX 3090 24GB$0.193/GPU-hour
24GB clears the official 16GB floor with room to spare, and Ampere's sm_86 is natively covered by the cu118/cu121 wheels for torch 2.1.0 — it just runs, and it is the cheapest safe card for this frozen stack.
Bulk library generation, 8–16 prompts in parallel
RTX 4090 24GB$0.540/GPU-hour
AudioGen decodes token by token across 4 codebooks at 50Hz, so decode throughput converts directly into clips per hour. Ada's fp16 performance earns its price here, and 24GB still swallows a large batch.
Fine-tuning audiogen-medium on your own sound library
RTX A6000 48GB$0.817/GPU-hour
fp32 weights plus gradients plus optimizer state run well over three times the inference footprint. 48GB lets you get a fine-tune working on a single card before you have to wrestle with FSDP sharding.
Training from scratch with AudioGenSolver, or multi-GPU full fine-tunes
A100 SXM4 80GB$1.088/GPU-hour
audiocraft's training recipes assume FSDP across multiple GPUs with fast interconnect. NexGPU nodes go up to 14 GPUs and 2,152GB of node VRAM, enough to lay out a full training run.
03 —
Four steps from bare instance to your first sound effect
Step two is the one that matters: pin torch back to 2.1.0 first, install audiocraft second — reverse that order and it will fail
- 01
Spin up a CUDA 12.1 instance and check the driver
Launch a PyTorch prebuilt image from console.nexgpu.net, SSH in, and look at the card. This is where the decision gets made: torch 2.1.0 only ever shipped cu118 and cu121 wheels, which cover compute capability up to Hopper (sm_90). The RTX 5090 is Blackwell, sm_120, and torch 2.1 has no kernels for it — you will get "no kernel image is available for execution on the device". The 3090, 4090, A10, A6000, A100 and V100 are all inside the supported range.
nvidia-smi && python -c "import torch; print(torch.__version__, torch.cuda.get_device_capability())" - 02
Install in order: torch 2.1.0 first, audiocraft second
audiocraft's requirements.txt asks for torch==2.1.0, torchaudio>=2.0.0,<2.1.2, torchvision==0.16.0, torchtext==0.16.0, xformers<0.0.23 and numpy<2.0.0. torchtext has been sunset by PyTorch upstream, so pip has to land on exactly 0.16.0, the build matched to torch 2.1. ffmpeg is a hard dependency — torchaudio's read and write paths need it — and the docs recommend a version below 5. Python 3.9 gives the least friction.
pip install "torch==2.1.0" "torchaudio==2.1.0" --index-url https://download.pytorch.org/whl/cu121 && pip install "numpy<2.0.0" setuptools wheel && pip install -U audiocraft && apt-get update && apt-get install -y ffmpeg - 03
Pull the weights and generate your first batch
The first call fetches three things from Hugging Face: state_dict.bin (3.68GB, the language model itself), compression_state_dict.bin (236MB, the retrained EnCodec), and the T5 text encoder from transformers (~0.9GB). Note that AudioGen is not in Hugging Face transformers — there is no AudioGenForConditionalGeneration class, only the audiocraft loader. Generation defaults are top_k=250, temperature=1.0, cfg_coef=3.0, duration=10.0; push cfg_coef higher when you want sound effects to track the prompt more literally.
python -c "from audiocraft.models import AudioGen; from audiocraft.data.audio import audio_write; m=AudioGen.get_pretrained('facebook/audiogen-medium'); m.set_generation_params(duration=10, top_k=250, cfg_coef=3.0); w=m.generate(['heavy rain on a metal roof with distant thunder','footsteps on gravel then a door creaking open']); [audio_write(f'out_{i}', x.cpu(), m.sample_rate, strategy='loudness', loudness_compressor=True) for i,x in enumerate(w)]" - 04
Put a web UI in front of it, or switch to batch scripts
The repo ships a Gradio demo, which is what you hand to a sound designer who does not write code. For volume, skip the UI: pass prompts as a list straight to model.generate(), because autoregressive decoding parallelises across the batch dimension — eight clips take nowhere near eight times as long as one. Anything past 10 seconds uses extend_stride sliding-window continuation; a smaller stride keeps more context and costs more compute, and the default of 2 seconds is the compromise.
python -m demos.audiogen_app --share
What running AudioGen on NexGPU actually costs
Price the whole path at real rates. Take an RTX 3090 24GB at $0.193/GPU-hour. Pulling weights means 3.68GB of language model, 236MB of EnCodec and roughly 0.9GB of T5 encoder — under 5GB total, and inbound transfer is not billed. Call it 40 minutes to install dependencies, get the first clip out and settle on prompts: 0.193 x 40/60 = $0.129. Then run a bulk generation pass for 3 hours: 0.193 x 3 = $0.579. Total so far: $0.708. Move to an RTX 4090 24GB at $0.540/GPU-hour and the same 3 hours is $1.62. The extra buys Ada's fp16 decode speed, and since AudioGen decodes 50 frames x 4 codebooks for every second of audio, decode speed is clips per hour. Export is close to free: 16kHz, 16-bit, mono means a 10-second clip is 10 x 16000 x 2 = 320KB. A thousand clips is 320MB, or 0.32GB, at the $0.0081/GB median egress rate — about $0.0026. Storage is the only thing that keeps billing: parking those 4.8GB of weights costs roughly $1.99/month at the $0.414/GB-month median. Compute billing stops the second the instance stops; storage runs until you destroy it. Metered per second, priced per hour, no minimum, no setup fee, no quota request — a 22-minute run on the 4090 is 0.540 x 22/60 = $0.198.
04 —
FAQ
How much VRAM does AudioGen need? Is a 24GB RTX 4090 enough?
Are there GGUF, Q4 or INT4 quantised builds of AudioGen?
What is the difference between AudioGen and MusicGen, and which should I use?
Can I use AudioGen commercially? What exactly does CC-BY-NC-4.0 restrict?
audiocraft won't install, or throws "no kernel image is available" — can I use an RTX 5090?
Is AudioGen still maintained? Is it worth deploying today?
Start building on NexGPU
Enterprise R&D team or solo developer — either way, your first job can be running in minutes.
Sign up to browse live network pricing. No payment method required.
