🤗KVAE-Audio | 🤗KVAE-Audio-Stereo | 🧨Diffusers | KVAE GitHub | Habr Article | Project Page | Technical Report
KVAE-Audio is a continuous, full-band (48 kHz) audio autoencoder. It compresses raw waveforms into compact continuous latents and reconstructs them with high fidelity across speech, music, and general sound. The model is designed not only for faithful reconstruction, but as a latent space for generative models — in our internal text-to-audio pipeline, swapping the autoencoder for KVAE-Audio improves generation quality under a fixed generator.
KVAE-Audio is the mono release and has 64 latent channels. KVAE-Audio-Stereo is the stereo release (technical report) and has 128 latent channels. Left and right stay separate waveform channels.
Both are available in Hugging Face Diffusers 🤗🧨 as AutoencoderKLKVAEAudio.
First install PyTorch (adjust for your CUDA setup):
pip install torch==2.11.0 torchvision==0.26.0 torchaudio==2.11.0 --index-url https://download.pytorch.org/whl/cu128Then clone the repository and install KVAE-Audio from the local package:
git clone https://github.com/kandinskylab/kvae-audio.git
pip install -e ./kvae-audioTested with Python 3.14.
KVAE-Audio is the mono checkpoint, kvae-audio.pt, with 64 latent channels. KVAE-Audio-Stereo is the stereo checkpoint, kvae-audio-stereo.pt, with 128 latent channels.
pip install huggingface_hub
hf download kandinskylab/KVAE-Audio kvae-audio.pt --local-dir .
hf download kandinskylab/KVAE-Audio-Stereo kvae-audio-stereo.pt --local-dir .Or from Python:
from huggingface_hub import hf_hub_download
mono_weights = hf_hub_download("kandinskylab/KVAE-Audio", "kvae-audio.pt")
stereo_weights = hf_hub_download("kandinskylab/KVAE-Audio-Stereo", "kvae-audio-stereo.pt")Place 48 kHz wavs in input_samples. Reconstructions are written to output_samples. Waveforms are (batch, channels, time). kvae-audio.pt is KVAE-Audio, the mono model: each channel of a stereo file is reconstructed on its own and written back as stereo. kvae-audio-stereo.pt is KVAE-Audio-Stereo: a stereo file stays left/right, and a mono file is duplicated into the model and averaged back to one channel on write.
python scripts/infer.py \
--input_path input_samples \
--output_path output_samples \
--weights_path kvae-audio-stereo.pt # or kvae-audio.ptCompare reference wavs in input_samples against reconstructions in output_samples (same filenames). Writes metrics.csv to output_samples, with mel, STFT, MFCC, waveform, SI-SDR, SDR, SNR, PESQ, and CCPC.
python scripts/eval.py \
--input_path input_samples \
--output_path output_samplesBy default encode returns the mean latent (mu); pass sample=True for stochastic sampling. For end-to-end reconstruction, model(waveform)["audio"] is equivalent. sample_rate is fixed on the model at 48 kHz.
import torch
import soundfile as sf
from kvae_audio import KVAEAudio
model = KVAEAudio.load("kvae-audio-stereo.pt", map_location="cpu") # or kvae-audio.pt
model.eval()
data, sr = sf.read("audio.wav", always_2d=True)
waveform = torch.from_numpy(data.T.copy()).float().unsqueeze(0) # (batch, channels, time)
batch, channels, length = waveform.shape
if model.num_channels == 1 and channels > 1:
model_input = waveform.reshape(batch * channels, 1, length)
elif channels == 1 and model.num_channels > 1:
model_input = waveform.repeat(1, model.num_channels, 1)
else:
model_input = waveform
with torch.no_grad():
latents, _, _, _ = model.encode(model_input)
audio = model.decode(latents)[..., :length]
if model.num_channels == 1 and channels > 1:
audio = audio.reshape(batch, channels, -1)
elif channels == 1 and audio.shape[1] > 1:
audio = audio.mean(dim=1, keepdim=True)
sf.write("output.wav", audio.squeeze(0).T.numpy(), sr)Generative quality is established under a fixed generator — same DiT architecture, training data, and number of steps — varying only the autoencoder. We report objective generation metrics and blind human side-by-side below.
Below are qualitative examples generated from the same text prompts using four different models.
Prompt:
Low and gravelly, with a southern Russian accent, a man says slowly, <S>Я говорил тебе, что так и будет<E>. A sharp inhale precedes the line. The space is acoustically dry, with minimal room tone and a slight hiss.
KVAE-Audio
Detailskvae1.mp4 |
MMAudio
Detailsmma1.mp4 |
DACVAE MovieGen
Detailsmoviegen1.mp4 |
SAME-L
Detailssamel1.mp4 |
Prompt:
In a home kitchen, oil sizzles in a pan, a knife chops on a board, and a woman hums softly in Russian, a refrigerator humming beneath it all. Small kitchen, light reverberation. High-fidelity.
KVAE-Audio
Detailskvae2.mp4 |
MMAudio
Detailsmma2.mp4 |
DACVAE MovieGen
Detailsmoviegen2.mp4 |
SAME-L
Detailssamel2.mp4 |
Prompt:
In a large reverberant hall, a brass band launches into a lively march. Trumpets and cornets carry the melody while trombones drive the harmony, brisk and precise. Clean recording, natural reverb, faint equipment hiss.
KVAE-Audio
Detailskvae3.mp4 |
MMAudio
Detailsmma3.mp4 |
DACVAE MovieGen
Detailsmoviegen3.mp4 |
SAME-L
Detailssamel3.mp4 |
| Model | # Params | Latent dim | CLAP↑ | CE↑ | PQ↑ | FAD (PANNs)↓ | FAD (PASST)↓ | FAD (VGGIsh)↓ |
|---|---|---|---|---|---|---|---|---|
| MMAudio 44.1kHz | 427.6M | 40 | 0,336 | 3,909 | 6,192 | 17,873 | 195,910 | 1,364 |
| DACVAE MovieGen | 107.7M | 128 | 0,313 | 3,772 | 6,167 | 20,558 | 234,312 | 1,700 |
| SAME-L | 852.1M | 256 | 0,322 | 3,588 | 5,756 | 18,446 | 240,635 | 1,325 |
| KVAE-Audio | 166.9M | 64 | 0,344 | 3,982 | 6,242 | 15,381 | 193,760 | 1,210 |
| Model | # Params | Latent dim | CLAP↑ | CE↑ | PQ↑ | FAD (PANNs)↓ | FAD (PASST)↓ | FAD (VGGIsh)↓ |
|---|---|---|---|---|---|---|---|---|
| MMAudio 44.1kHz | 427.6M | 40 | 0,356 | 7,136 | 7,707 | 5,412 | 158,599 | 0,356 |
| DACVAE MovieGen | 107.7M | 128 | 0,312 | 6,953 | 7,538 | 10,194 | 214,009 | 1,046 |
| SAME-L | 852.1M | 256 | 0,345 | 7,076 | 7,465 | 8,442 | 250,668 | 0,987 |
| KVAE-Audio | 166.9M | 64 | 0,339 | 7,216 | 7,929 | 7,971 | 189,427 | 0,599 |
| Model | # Params | Latent dim | CLAP↑ | CE↑ | PQ↑ | FAD (PANNs)↓ | FAD (PASST)↓ | FAD (VGGIsh)↓ | WER↓ | CER↓ |
|---|---|---|---|---|---|---|---|---|---|---|
| MMAudio 44.1kHz | 427.6M | 40 | 0,368 | 5,704 | 6,629 | 8,305 | 105,931 | 2,001 | 0,257 | 0,593 |
| DACVAE MovieGen | 107.7M | 128 | 0,413 | 5,482 | 7,052 | 5,008 | 210,478 | 1,501 | 0,911 | 1,048 |
| SAME-L | 852.1M | 256 | 0,379 | 4,617 | 5,024 | 10,257 | 301,508 | 2,721 | 0,349 | 0,629 |
| KVAE-Audio | 166.9M | 64 | 0,389 | 5,906 | 6,940 | 4,677 | 185,609 | 2,138 | 0,244 | 0,576 |
Reconstruction is evaluated on open datasets across domains (the released weights directly substantiate these numbers). Baselines: MMAudio 44.1 kHz VAE, DACVAE from MovieGen Audio, SAME-L (Stable Audio 3 VAE).
| Model | # Params | Latent dim | MEL↓ | STFT↓ | Waveform↓ | SI-SDR↑ | SDR↑ | SNR↑ |
|---|---|---|---|---|---|---|---|---|
| MMAudio 44.1kHz | 427.6M | 40 | 0,636 | 1,938 | 0,106 | -32,080 | -2,682 | -2,686 |
| DACVAE MovieGen | 107.7M | 128 | 0,669 | 2,275 | 0,029 | 8,384 | 9,421 | 9,416 |
| SAME-L | 852.1M | 256 | 0,986 | 2,726 | 0,027 | 9,586 | 10,347 | 10,339 |
| KVAE-Audio | 166.9M | 64 | 0,537 | 1,770 | 0,027 | 9,065 | 9,920 | 9,933 |
| Model | # Params | Latent dim | MEL↓ | STFT↓ | Waveform↓ | SI-SDR↑ | SDR↑ | SNR↑ |
|---|---|---|---|---|---|---|---|---|
| MMAudio 44.1kHz | 427.6M | 40 | 0,681 | 1,865 | 0,114 | -40,204 | -3,274 | -3,273 |
| DACVAE MovieGen | 107.7M | 128 | 0,519 | 1,762 | 0,024 | 9,688 | 10,046 | 10,047 |
| SAME-L | 852.1M | 256 | 0,668 | 1,786 | 0,023 | 10,278 | 10,648 | 10,648 |
| KVAE-Audio | 166.9M | 64 | 0,516 | 1,725 | 0,022 | 10,390 | 10,675 | 10,677 |
| Model | # Params | Latent dim | MEL↓ | STFT↓ | Waveform↓ | SI-SDR↑ | SDR↑ | SNR↑ | PESQ↑ |
|---|---|---|---|---|---|---|---|---|---|
| MMAudio 44.1kHz | 427.6M | 40 | 0,616 | 1,395 | 0,030 | -29,947 | -2,728 | -2,697 | 2,424 |
| DACVAE MovieGen | 107.7M | 128 | 0,453 | 1,310 | 0,006 | 10,264 | 10,680 | 10,681 | 4,246 |
| SAME-L | 852.1M | 256 | 0,774 | 1,575 | 0,007 | 9,939 | 10,374 | 10,376 | 2,982 |
| KVAE-Audio | 166.9M | 64 | 0,463 | 1,314 | 0,006 | 9,952 | 10,377 | 10,384 | 4,266 |
KVAE-Audio-Stereo is the stereo full-band 48 kHz waveform tokenizer, with 128 latent channels, a 50 Hz latent rate, and 167M parameters. Left and right are encoded jointly. Generative quality uses one fixed generator on every latent: an open-source 0.6B diffusion transformer adapted for audio, trained from scratch for 60,000 steps on one internal general-audio dataset. The generation baselines are SAME-L (44.1 kHz, 256 latent channels, about 10.8 Hz, 852M), the autoencoder of Stable Audio 3, and the LTX 2.5 audio VAE (48 kHz, 128 latent channels, 25 Hz, 182M).
Listening tests use a fixed pool of 148 prompts spanning sounds, speech, and music. Listeners judge prompt following and audio quality separately and may mark both outputs as good or both as bad. Win rates give half credit for both good and exclude both bad. Against SAME-L, KVAE-Audio-Stereo wins 55/68/64% of the prompt-following comparisons and 71/98/93% of the audio-quality comparisons. Against the LTX 2.5 audio VAE it wins 74/60/67% and 82/78/94%. On audio quality it wins more than 70% of the comparisons against both models in every category.
CLAP in these tables is LAION CLAP.
| Model | # Params | Latent dim | CLAP↑ | CE↑ | PQ↑ | FD (OPEN-L3)↓ | FAD (VGG)↓ |
|---|---|---|---|---|---|---|---|
| SAME-L | 852M | 256 | 0,25 | 3,60 | 5,84 | 232,87 | 6,02 |
| LTX 2.5 | 182M | 128 | 0,27 | 4,04 | 6,36 | 227,02 | 5,13 |
| KVAE-Audio-Stereo | 167M | 128 | 0,29 | 4,33 | 6,52 | 218,34 | 4,27 |
| Model | # Params | Latent dim | CLAP↑ | CE↑ | PQ↑ | FD (OPEN-L3)↓ | FAD (VGG)↓ |
|---|---|---|---|---|---|---|---|
| SAME-L | 852M | 256 | 0,30 | 7,41 | 7,77 | 127,87 | 2,11 |
| LTX 2.5 | 182M | 128 | 0,29 | 7,56 | 8,10 | 117,61 | 2,04 |
| KVAE-Audio-Stereo | 167M | 128 | 0,26 | 7,57 | 8,14 | 114,36 | 2,20 |
| Model | # Params | Latent dim | CLAP↑ | CE↑ | PQ↑ | FD (OPEN-L3)↓ | FAD (VGG)↓ | WER (%)↓ |
|---|---|---|---|---|---|---|---|---|
| SAME-L | 852M | 256 | 0,17 | 4,20 | 4,80 | 145,90 | 7,19 | 58,97 |
| LTX 2.5 | 182M | 128 | 0,15 | 5,42 | 6,32 | 119,39 | 5,80 | 29,62 |
| KVAE-Audio-Stereo | 167M | 128 | 0,17 | 5,93 | 7,25 | 123,29 | 4,51 | 25,93 |
Objective scores agree with the listening tests on AudioCaps and Seed-TTS Eval. On Song Describer, SAME-L and LTX 2.5 score higher on CLAP and FAD (VGG).
Reconstruction uses a test set of music, speech, and sound effects from open datasets, kept only when the file is stereo at its true sample rate and disjoint from training, about 13 hours in total. The metrics are multi-scale mel (MEL) and STFT distances, MFCC distance, waveform L1, SI-SDR, SNR, PESQ on speech, and cross-channel phase coherence (CCPC). CCPC is the energy-weighted phasor coherence between the inter-channel phase differences of the reference and the reconstruction, averaged over four STFT resolutions. Results are grouped by the sample rate at which the metrics are computed. Within a group, the reference and every reconstruction are downsampled to that rate. LTX 2.5 analyzes a 16 kHz mel representation and is evaluated on its 48 kHz vocoder output, so its scores describe that full analysis, VAE, and vocoder pipeline.
| Model | Sample rate | Channels | Latent rate | Latent dim | # Params | Representation |
|---|---|---|---|---|---|---|
| SAME-L | 44.1 kHz | 2 | ~10.8 Hz | 256 | 852M | waveform |
| LTX 2.5 audio VAE | 48 kHz | 2 | 25 Hz | 128 | 182M | mel + vocoder |
| KVAE-Audio-Stereo | 48 kHz | 2 | 50 Hz | 128 | 167M | waveform |
44.1 kHz
| Dataset | Model | MEL↓ | STFT↓ | MFCC↓ | Waveform↓ | SI-SDR↑ | SNR↑ | PESQ↑ | CCPC↑ |
|---|---|---|---|---|---|---|---|---|---|
| Sounds | SAME-L | 0,96 | 2,36 | 0,22 | 0,0449 | 2,66 | 4,80 | – | 0,8436 |
| Sounds | KVAE-Audio-Stereo | 0,68 | 2,31 | 0,16 | 0,0475 | 2,73 | 4,75 | – | 0,8575 |
| Music | SAME-L | 0,88 | 2,64 | 0,24 | 0,0380 | 9,72 | 10,19 | – | 0,9563 |
| Music | KVAE-Audio-Stereo | 0,71 | 2,80 | 0,25 | 0,0313 | 11,57 | 11,81 | – | 0,9765 |
| Speech | SAME-L | 0,81 | 1,85 | 0,17 | 0,0076 | 9,49 | 9,97 | 2,43 | 0,9981 |
| Speech | KVAE-Audio-Stereo | 0,34 | 1,23 | 0,06 | 0,0054 | 11,78 | 12,07 | 4,47 | 0,9987 |
48 kHz
| Dataset | Model | MEL↓ | STFT↓ | MFCC↓ | Waveform↓ | SI-SDR↑ | SNR↑ | PESQ↑ | CCPC↑ |
|---|---|---|---|---|---|---|---|---|---|
| Sounds | LTX 2.5 | 1,40 | 4,37 | 0,39 | 0,0888 | -48,30 | -2,42 | – | 0,7311 |
| Sounds | KVAE-Audio-Stereo | 0,68 | 2,33 | 0,16 | 0,0475 | 2,74 | 4,75 | – | 0,8576 |
| Music | LTX 2.5 | 1,32 | 4,05 | 0,36 | 0,1700 | -46,24 | -2,85 | – | 0,7771 |
| Music | KVAE-Audio-Stereo | 0,69 | 2,67 | 0,23 | 0,0311 | 11,65 | 11,86 | – | 0,9765 |
| Speech | LTX 2.5 | 1,18 | 3,39 | 0,30 | 0,0318 | -36,51 | -2,94 | 3,00 | 0,9881 |
| Speech | KVAE-Audio-Stereo | 0,36 | 1,42 | 0,07 | 0,0054 | 11,78 | 12,07 | 4,47 | 0,9987 |
Song Describer, LibriSpeech, and AudioCaps. εar-VAE is the 44.1 kHz model with 141M parameters and 128 latent channels. LibriSpeech is reported without CCPC.
44.1 kHz
| Dataset | Model | MEL↓ | STFT↓ | MFCC↓ | Waveform↓ | SI-SDR↑ | SNR↑ | PESQ↑ | CCPC↑ |
|---|---|---|---|---|---|---|---|---|---|
| Song Describer | SAME-L | 1,3729 | 4,8432 | 0,4132 | 0,1133 | -16,737 | 4,777 | – | 0,8486 |
| Song Describer | εar-VAE | 1,0172 | 3,3991 | 0,3253 | 0,0401 | 11,382 | 11,708 | – | 0,9701 |
| Song Describer | KVAE-Audio-Stereo | 0,7953 | 3,3646 | 0,3171 | 0,0346 | 13,097 | 13,264 | – | 0,9805 |
| LibriSpeech | SAME-L | 1,2538 | 5,2836 | 0,4487 | 0,0067 | 13,758 | 13,889 | 2,914 | – |
| LibriSpeech | εar-VAE | 0,8368 | 3,8835 | 0,3038 | 0,0065 | 13,511 | 13,747 | 3,360 | – |
| LibriSpeech | KVAE-Audio-Stereo | 0,3237 | 3,1338 | 0,1848 | 0,0044 | 16,396 | 16,492 | 4,460 | – |
| AudioCaps | SAME-L | 1,0521 | 2,8198 | 0,2888 | 0,0275 | 7,285 | 8,285 | – | 0,9685 |
| AudioCaps | εar-VAE | 0,7638 | 1,8738 | 0,1484 | 0,0269 | 6,974 | 8,129 | – | 0,9697 |
| AudioCaps | KVAE-Audio-Stereo | 0,5276 | 1,8246 | 0,1064 | 0,0238 | 10,123 | 9,777 | – | 0,9771 |
48 kHz
| Dataset | Model | MEL↓ | STFT↓ | MFCC↓ | Waveform↓ | SI-SDR↑ | SNR↑ | PESQ↑ | CCPC↑ |
|---|---|---|---|---|---|---|---|---|---|
| Song Describer | LTX 2.5 | 1,2841 | 4,0267 | 0,3419 | 0,1999 | -42,790 | -2,773 | – | 0,7741 |
| Song Describer | KVAE-Audio-Stereo | 0,7802 | 3,2060 | 0,2973 | 0,0346 | 13,098 | 13,265 | – | 0,9806 |
| LibriSpeech | LTX 2.5 | 2,0286 | 6,2693 | 0,5784 | 0,0477 | -31,975 | -3,124 | 3,712 | – |
| LibriSpeech | KVAE-Audio-Stereo | 0,3162 | 3,4890 | 0,1840 | 0,0044 | 16,395 | 16,492 | 4,460 | – |
| AudioCaps | LTX 2.5 | 1,1980 | 3,3200 | 0,2795 | 0,0932 | -45,388 | -2,839 | – | 0,9356 |
| AudioCaps | KVAE-Audio-Stereo | 0,5327 | 1,9408 | 0,1138 | 0,0238 | 10,122 | 9,777 | – | 0,9772 |
@misc{kvae_audio_2026,
author = {Ivan Kirillov, Denis Parkhomenko, Alexander Ivanov, Azat Saginbaev, Egor Silvestrov, Denis Dimitrov},
title = {KVAE-Audio: a full-band continuous audio tokenizer for generative models},
howpublished = {\url{https://github.com/kandinskylab/kvae-audio}},
year = 2026
}
kvae-audio/
├── kvae_audio/
│ ├── model/
│ │ ├── kvae_audio.py
│ │ └── base.py
│ ├── metrics/loss.py
│ └── nn/layers.py
└── scripts/
├── infer.py
└── eval.py



