kandinskylab/KVAE-2D-3.0
- License
- mit
- Size
- not mirrored yet
No official torrent yet — requesting it tells the flock what to host next. You cannot seed a catalog-only page.
Cataloged from kandinskylab/KVAE-2D-3.0
All models by kandinskylab →No official torrent yet — requesting it tells the flock what to host next. You cannot seed a catalog-only page.
Cataloged from kandinskylab/KVAE-2D-3.0
All models by kandinskylab →KVAE-2D-3.0 is an image variational autoencoder for latent diffusion. It encodes RGB images into a compact continuous representation with 8× spatial downsampling and 32 latent channels. Semantic feature alignment shapes the latent space for downstream diffusion generation, alongside the reconstruction objective.
The model has 85.6M parameters, approximately 61% fewer than KVAE-2D-2.1. It achieves higher reconstruction PSNR and SSIM than FLUX.2 VAE and a lower generation FD-CLIP after 200K diffusion-transformer training steps.
Compression is shown as H × W for images and T × H × W for videos. For audio, it is the number of waveform samples per latent timestep; both audio models operate at 48 kHz.
KVAE-2D-3.0 compresses image height and width by a factor of 8 and uses 32 latent channels. Compared with KVAE-2D-2.1, the deepest residual stage is reduced from 1,024 to 512 channels, and self-attention is added to both the encoder and decoder bottlenecks.
During training, an eight-block probe based on SiT-XL/2 predicts features extracted from clean images by a frozen DINOv2 ViT-B/14 encoder. The probe receives noisy VAE latents and is conditioned on the noise level. Its alignment loss jointly trains the probe and the VAE encoder.

The tokenizer and probe are trained jointly for 600,000 steps on 256 × 256 crops from an internal dataset. The encoder is then frozen, and the decoder is refined on random 512 × 512 crops using pixelwise, perceptual, and adversarial losses. This stage refines image reconstruction while preserving the learned latent representation.
Run from the KVAE source repository root with the KVAE 3.0 code. The reference environment uses Python 3.11, PyTorch 2.8.0, and CUDA 12.8.
read_image loads RGB pixels into [-1, 1]. The model input has shape [B, 3, H, W]; image height and width must be divisible by 8.
Reconstruction is evaluated on all 5,000 COCO val2017 images at native scale. Each spatial dimension is center-cropped to a multiple of 32, and the posterior mean is decoded in bfloat16. PSNR, SSIM, and AlexNet LPIPS are averaged over images.
To compare the latent spaces for generation, separate 2B-parameter Kandinsky 5 text-to-image diffusion transformers are trained using each tokenizer. All three runs use the same training setup, with 64 GPUs per run. Generation quality is measured by FD-CLIP, the Fréchet distance between generated and reference images in CLIP ViT-L/14 feature space.
Evaluation uses 3,000 English prompts, 256 × 256 images, 50 sampling steps, guidance scale 5, and sampling shift 5. At 100K training steps, FLUX.2 and KVAE-2D-3.0 have similar FD-CLIP scores of 13.63 and 13.66. At 200K steps, KVAE-2D-3.0 has the lowest score among the three tokenizers:

The KVAE-2D-3.0 and FLUX.2 generators are compared at 200K DiT training steps using the same prompt and random seed for each image pair. The KVAE-based generator receives tie-adjusted preference shares of 52.5% for prompt following, 50.8% for visual quality, and 50.5% for semantic quality. Visual and semantic preferences are close to parity. Both-good ratings give half credit to each system; both-poor ratings are excluded.

In a separate text-to-image experiment, a 0.61B-parameter generator trained on KVAE-2D-3.0 latents is evaluated using exponential moving average (EMA) weights at 100K steps. It achieves the highest GenAI-Bench score (0.726) and the second-highest three-metric mean (0.745) in the reported ranking, behind E2E-Qwen-Image-VAE (0.747).
The table shows three of the 12 tokenizer configurations used for ranking. The separate FLUX.2-VAE + REG configuration is excluded from the ranking.
pip install -r requirements.txtimport torch
from data import read_imagefrom kvae import KVAEImage
device = torch.device("cuda:0")dtype = torch.bfloat16
model = ( KVAEImage.from_pretrained("kandinskylab/KVAE-2D-3.0", strict=True) .eval() .to(device=device, dtype=dtype))
image = read_image("path/to/image.png").unsqueeze(0)image = image.to(device=device, dtype=dtype)
with torch.no_grad(): latent = model.encode(image).latent_dist.mode() reconstruction = model.decode(latent).clip(-1, 1)