Skip to main content

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.

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

VersionParametersVRAMContextNotes
facebook/audiogen-medium1.5BOfficial: 16GB minimum; state_dict.bin 3.68GB + EnCodec 236MB + T5 text encoder ~0.9GB10s 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 releasedn/a5sThe 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-medium1.5BSame class as audiogen-medium; the official 16GB-minimum guidance applies10sShips 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-small300MOne fifth the parameters of medium; roughly 0.6GB of fp16 weights10sThe 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)~1BDiffusion architecture, so its memory curve behaves nothing like autoregressive AudioGenUp to 47s44.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

  1. 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())"
  2. 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
  3. 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)]"
  4. 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?

The AudioCraft docs state it directly: inference with the medium-sized models (~1.5B parameters) requires a GPU with at least 16GB of memory, and audiogen-medium is exactly that tier. The download is 3.68GB of state_dict.bin plus 236MB of EnCodec plus roughly 0.9GB of T5 encoder, so the weights alone are far smaller — the 16GB figure exists because autoregressive decoding grows KV cache with batch size and duration. A 24GB RTX 4090 is comfortably enough and leaves room for a large batch. If you want to spend less, NexGPU's RTX 3090 24GB is $0.193/GPU-hour with the same VRAM and an architecture equally well covered by torch 2.1 — the best value entry card for this model.

Are there GGUF, Q4 or INT4 quantised builds of AudioGen?

No. This expectation comes over from the LLM world and does not apply here — AudioGen lives outside the llama.cpp ecosystem, and there is no official or meaningful community GGUF, ONNX or INT4 port on Hugging Face. What you do get is fp16 autocast on CUDA, which audiocraft already does by default; beyond that there is no low-bit path. The practical consequence is that the 16GB floor is real and there is no "quantise it onto an 8GB card" trick. Since you cannot save VRAM, save rent instead: a 24GB RTX 3090 on NexGPU is under twenty cents an hour, billed per second, stopped the moment you are done.

What is the difference between AudioGen and MusicGen, and which should I use?

Nearly identical architecture, entirely different training data and purpose. AudioGen learned from AudioSet, the BBC sound effects library, AudioCaps, Clotho v2, VGG-Sound and FSD50K, outputs 16kHz mono, and is built for sound effects, ambience and foley. MusicGen learned from licensed music, outputs 32kHz, and is built for melody and arrangement. Neither produces realistic vocals, and both expect English prompts. The test is simple: if you want a score, use MusicGen; if you want a door creak, rain, or a train pulling in, use AudioGen. Both live in the same audiocraft repo with the same dependencies, so one 24GB NexGPU instance installs once and switches between them freely.

Can I use AudioGen commercially? What exactly does CC-BY-NC-4.0 restrict?

The code is MIT and unrestricted. The weights are CC-BY-NC-4.0, where NC means NonCommercial — you cannot ship audio generated by audiogen-medium in a commercial product, a paid sample pack, or a paid service. Meta's model card also frames it as research and educational use, not something to put into production without further risk assessment. If you need a commercial path, Stable Audio Open 1.0 uses the Stability AI Community License and was trained entirely on CC-licensed Freesound and FMA audio, with far clearer commercial terms; alternatively, retrain weights on your own material using AudioGen's training recipe and those weights are yours. Whichever route you take, validating it on a per-second NexGPU rental costs single-digit dollars.

audiocraft won't install, or throws "no kernel image is available" — can I use an RTX 5090?

Not recommended. audiocraft pins torch to exactly 2.1.0, and torch 2.1.0 only ever published cu118 and cu121 wheels, covering compute capability through Hopper (sm_90). The RTX 5090 is Blackwell at sm_120, so torch 2.1 has no kernels for it and you get that error immediately. Unpicking the dependency graph to reach torch 2.7+ means also fighting torchtext==0.16.0 and numpy<2.0.0, which is rarely worth it. The frozen stack actually makes older cards the correct answer: NexGPU's RTX 3090 24GB ($0.193/GPU-hour), Tesla V100 32GB ($0.188/GPU-hour), A10 24GB ($0.414/GPU-hour) and A6000 48GB ($0.817/GPU-hour) all sit inside torch 2.1's native support range and install cleanly from boot.

Is AudioGen still maintained? Is it worth deploying today?

Straight answer: audiocraft's last PyPI release was 1.3.0 in June 2024, the last repo commit was March 2025, and the audiogen-medium weights have not moved since March 2024. It is frozen but functional — and because it is frozen, an environment that works will not be broken by upstream churn. Its value now is a ready-made controllable sound-effect baseline, a complete training recipe you can fine-tune on your own material, and MIT-licensed code. If you want speed, swap to audio-magnet in the same repo (non-autoregressive, 7x faster than the autoregressive baseline per the paper); if you want 44.1kHz stereo and looser commercial terms, look at Stable Audio Open. Every one of those paths needs a card to test on, and NexGPU has 1,175 verified nodes across 51 countries and regions, 2,498 GPUs and 75 GPU models, billed per second with no minimum — those 40 minutes of environment setup cost about thirteen cents.

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.