Kandinsky 6.0 VSR 2.0: A Distilled Video Upscaling Pipeline
2 min readupdated
This repository contains a full package of components for video upscaling within the Kandinsky 6.0 ecosystem. The model is based on a 1.4B SR DiT (diffusion transformer) distilled using the π-Flow DX method down to just 2 model evaluation steps per tile. The updated VSR 2.0 version generates more natural details and cleaner upscaling compared to the first version. The tool will be useful for developers and researchers for fast processing and resolution upscaling of video materials using the Diffusers library.
Key features
- Extreme speed: just 2 model evaluation steps thanks to π-Flow DX distillation.
- Diffusers integration: the full pipeline is available out of the box via the
from_pretrainedmethod. - Flexible scaling: support for 2x, 2.25x, or 4x resolution upscaling using tiled latent diffusion in the KVAE space.
- Performance optimization: support for compilation via
torch._inductorand theflexattention backend.
What you can do
- Video resolution upscaling: enhance video quality up to Full HD and higher while preserving details.
- Pipeline integration: use the ready-made bundle for automated video content processing in computer vision projects.
- Generation experiments: configure random number generators and scaling factors to achieve the best result.
Example
import torch
from diffusers import Kandinsky6SRPipeline
from diffusers.utils import export_to_video, load_video
torch._inductor.config.max_autotune = True
pipe = Kandinsky6SRPipeline.from_pretrained("Ddb703/Kandinsky-6.0-VSR-2.0-distilled2steps-Diffusers", torch_dtype=torch.bfloat16)
pipe.enable_model_cpu_offload()
pipe.transformer.set_attention_backend("flex")
pipe.transformer.compile_repeated_blocks(fullgraph=True)
video = load_video("lq.mp4")
output = pipe(
video=video,
resolution_scale=2.25,
num_inference_steps=2,
generator=torch.Generator("cuda").manual_seed(1137),
)
export_to_video(output.frames[0], "lq_sr.mp4", fps=24)
Read more
DetailsComponent parameters: SR DiT (1.41B), KVAE VAE (1.74B), latent upscaler bank (3.65B).
Requirements: mandatory parameter
num_inference_steps=2 to avoid schedule failures.Features: the pipeline works with video only; original audio must be mixed separately.










Comments