/ Модель

Характеристики

Лицензия
MIT
Библиотека
kvae
Опубликована
26 ноя 2026

KVAE-2D-3.0

Преобразование изображенийИзображение, текст → изображение
184скачиваний за 30 дней15лайковвеса обновлены30 ноя 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

KVAE-2D-3.0 — компактный вариационный автоэнкодер, который кодирует RGB-изображения в латенты для диффузионной генерации и восстанавливает изображения из них.

KVAE-2D-3.0 — вариационный автоэнкодер изображений от Kandinsky Lab, предназначенный для кодирования и восстановления изображений в системах латентной диффузии. Он преобразует RGB-изображения в непрерывное латентное представление с уменьшением пространственного разрешения в 8 раз и 32 каналами. Модель содержит 85,6 млн параметров; архитектура включает остаточные блоки и механизмы self-attention в узких местах энкодера и декодера. При обучении латентное пространство выравнивалось по семантическим признакам DINOv2.

Модель подходит для создания и декодирования латентов в диффузионных системах, а также для реконструкции изображений. В README приведены сравнительные показатели реконструкции и эксперименты с генераторами text-to-image, обученными на латентах KVAE; сама модель не является генератором по текстовому запросу. Для работы требуются код KVAE 3.0, PyTorch и CUDA. Лицензия — MIT.

Сценарии применения

  • кодирование изображений в латенты для обучения диффузионной модели
  • декодирование латентов диффузионной модели в изображения
  • реконструкция RGB-изображений
  • сравнение латентных токенизаторов для генерации изображений

Ограничения

Модель кодирует и восстанавливает изображения, но сама по себе не генерирует изображения по текстовым запросам. Для инференса требуется исходный код KVAE 3.0 и среда с PyTorch и CUDA.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Project page | GitHub | Technical report |

KVAE-Image 3.0 | KVAE-Video 3.0 | KVAE-Audio-Stereo

KVAE 3.0: Image tokenizer

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.

Model zoo

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.

Current models

ModelModalityCompressionLatent channels
KVAE-Image 3.0Image8 × 832
KVAE-Video 3.0Video4 × 32 × 32128
KVAE-Audio-StereoStereo audio960128

Previous models

ModelModalityCompressionLatent channels
KVAE-Image 2.0Image8 × 832
KVAE-Image 1.0Image8 × 816

Architecture and training

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.

Image VAE training with reconstruction and DINOv2 feature-alignment branches

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.

Inference

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.

pip install -r requirements.txt
import torch

from data import read_image
from 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)

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.

Evaluation

Image reconstruction

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.

TokenizerLatent channelsParametersPSNR (dB) ↑SSIM ↑LPIPS (AlexNet) ↓
FLUX.1-dev1683.8M29.890.86620.0234
FLUX.2-dev3284.0M31.370.89240.0167
KVAE-2D-2.132218.4M32.150.90570.0264
KVAE-2D-3.03285.6M32.180.90700.0258

Generation during diffusion training

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:

TokenizerFD-CLIP at 100K DiT steps ↓FD-CLIP at 200K DiT steps ↓
KVAE-2D-3.013.6612.72
KVAE-2D-2.1—13.30
FLUX.2 VAE13.6313.05

Generation FD-CLIP for the three tokenizers across DiT training steps

Human preferences

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.

Human preference shares for generators using KVAE-2D-3.0 and FLUX.2 VAE

DiffusionBench

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.

TokenizerGenEvalDPG-BenchGenAI-BenchMean
E2E-Qwen-Image-VAE0.6910.8350.7140.747
KVAE-2D-3.00.6730.8370.7260.745
FLUX.2-VAE0.6750.8300.7120.739

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · kvae

Нельзя запустить

Модели «картинка → картинка» пока не запускаются: нужен ввод изображения для diffusion.

Ревизия весов
bcf9296

0 моделей