kandinskylab/KVAE-3D-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-3D-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-3D-3.0
All models by kandinskylab →KVAE-3D-3.0 is a causal video variational autoencoder for latent diffusion. It encodes RGB video into 128-channel continuous latents with 4× temporal downsampling and 32× downsampling along each spatial axis. Its fully convolutional architecture combines higher spatial compression with V-JEPA feature alignment for downstream generation.
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-3D-3.0 increases spatial compression from the f16t4 design of KVAE-3D-2.0 to f32t4. The encoder adds a downsampling stage, the decoder adds a corresponding upsampling stage, and both include additional residual blocks. The architecture remains fully convolutional and supports full-frame inference.
Training aligns the latent representations with V-JEPA features. The decoder is fine-tuned using both images and video clips, with higher-resolution refinement producing better results.
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.
input_norm="m11" converts pixel values using pixel / 128 - 1. TruncVideo(32, 4) crops height and width to multiples of 32 and keeps 4n + 1 frames.
Temporal segments are processed through internal block caches. Do not process independent videos concurrently or interleave their chunks on the same model instance. Use a separate KVAEVideo instance for each concurrent stream.
from_pretrained loads the checkpoint's per-channel statistics into model.latent_mean and model.latent_std together with the weights. With normalization enabled, encode returns the posterior in normalized coordinates, z_normalized = (z_raw - latent_mean) / latent_std; decode reverses this transform before reconstruction.
KVAE-Video 3.0 enables normalization by default through model.latent_normalization.enabled in config.json. Omitting use_latent_norm or passing None follows this default. To override it, use the same flag in both calls:
Reconstruction is evaluated on MCL-JCV (720p).
PSNR and SSIM are higher-is-better; LPIPS is lower-is-better. Bold indicates the best result for each metric.
Video generation models are trained first on images and then on videos, using the causal tokenizer across both stages. The figure compares human preference shares for generators using KVAE-3D-3.0 and MiniMax-H3 VAE.
Both-good ratings give half credit to each system; both-poor ratings are excluded. The generation setups use different latent patches: 1 × 1 for KVAE and 2 × 2 for MiniMax-H3, resulting in 128- and 96-dimensional input vectors, respectively.

pip install -r requirements.txtimport torch
from data import VideoReaderfrom data.video_dataset import TruncVideofrom kvae import KVAEVideo
device = torch.device("cuda:0")dtype = torch.bfloat16
model = ( KVAEVideo.from_pretrained("kandinskylab/KVAE-3D-3.0", strict=True) .eval() .to(device=device, dtype=dtype))
reader = VideoReader( stream_pattern="*.png", input_norm="m11", transform=TruncVideo(spatial_compression=32, temporal_compression=4),)video = reader.read_video("path/to/video.mp4")["frames"].unsqueeze(0)video = video.to(device=device, dtype=dtype)
with torch.no_grad(): latent = model.encode(video, seg_len=16).latent_dist.mode() reconstruction = model.decode(latent, seg_len=16).clip(-1, 1)with torch.no_grad(): # Use the per-channel statistics loaded from the checkpoint. latent = model.encode(video, use_latent_norm=True).latent_dist.mode() reconstruction = model.decode(latent, use_latent_norm=True).clip(-1, 1)
# Work with raw latents, without normalization. latent = model.encode(video, use_latent_norm=False).latent_dist.mode() reconstruction = model.decode(latent, use_latent_norm=False).clip(-1, 1)