cd /news/machine-learning/vaezip-store-vae-encoded-latent-data… · home › topics › machine-learning › article
[ARTICLE · art-151664] src=discuss.huggingface.co ↗ pub= topic=machine-learning verified=true sentiment=↑ positive

VaeZip: store VAE-encoded latent datasets in 5-10x fewer space with almost no quality loss

TensorForger released VaeZip, a PyTorch library that stores VAE-encoded latent tensors in Safetensors files 5-10x smaller than fp32 by quantizing values to 2-8 bits, with pixel MSE of 0.0003 after decoding at roughly 3 bits per value. The codecs were chosen from the LatentStorageBenchmark comparison of about 50 algorithms across 8 image and video VAEs, and a separate VaeZipTrainBench run found the loss curve for pre-training a small T2I flow-matching DiT indistinguishable from the fp32 baseline at 6-bit storage.

read1 min views1 publishedOct 16, 2026

VaeZip is a PyTorch-based library that implements several latent quantization codecs and stores the compressed tensors in common Safetensors files that are much smaller then if you store these tensors in fp32.

The main use cases of this are

The codecs are designed specifically for VAE latents: some of them exploit both spatial redundancy and that the VAE latent distribution is usually normal. That allows to store latent tensor with about 3 bits/value precision (10x smaller files) while keeping pixel MSE at 0.0003 after decoding.

For example, one of the best codecs uses a combination of global range scaling, local range scaling with square spatial blocks and so called “Lloyd-Max table” which is essentially codebook that is tuned for the sample distribution. After that it quantizes values to 2-8 bits and packs them. The codecs were selected from the benchmark that compared ~50 algorithms on 8 image and video VAEs by the reconstruction quality, fidelity, space usage and I/O latency.

I have also measured the impact on pre-training a small T2I flow matching DiT with latents compressed with different codecs. In one run the loss curve is indistinguishable from the fp32 baseline with just 6 bit storage.

── more in #machine-learning 4 stories · sorted by recency
── more on @vaezip 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/vaezip-store-vae-enc…] indexed:0 read:1min 2026-10-16 · —