Open model upscales blurry photos 4x in one step: how was Kandinsky ImageSR 2.0 trained?
Kandinsky Lab's MIT-licensed model upscales images 2x or 4x and was trained on degraded images, judge-picked crops and two frequency losses.
Anyone who has tried to blow up a blurry phone photo or a small AI-generated image for print runs into the same question: where does the missing detail come from? Kandinsky ImageSR 2.0, which Kandinsky Lab put on Hugging Face on 24 November, does it in a single step. It upscales an image 2x or 4x, and since a 28 November update it can also enhance an image at its original size. Code and model are open under MIT.
By the lab's own measurements, a 1024-pixel image becomes 4096 pixels in 4 to 8 seconds on an H100, depending on the speed settings. The most interesting part is the training recipe: a custom degradation pipeline, a "judge" model that picks the richest regions to train on, and two frequency losses aimed at grid-like artifacts.
What it does
ImageSR 2.0 is a super-resolution model fine-tuned from the diffusion transformer of Kandinsky 5.0 Image Lite. It works in the compressed latent space of a frozen VAE taken from Black Forest Labs' FLUX.1-schnell (Apache 2.0). Instead of the dozens of steps an image generator usually takes, it runs the transformer once per tile and reaches the result with a single Euler step. There is no text prompt: according to the English model page, the text encoder and cross-attention were baked into precomputed tables, so no language model runs at inference. Images are processed as 1024x1024 output tiles with 25% overlap and blended, so any aspect ratio works. The only user setting is "creativity", nine levels from 0 to 8 with 4 as default; lower levels stay closer to the input, and the repo recommends them for fine text.
How the model was trained
The fullest account is the lab's Russian technical blog post. The data consists of high-resolution images with faces, textures, text and architecture; sources and counts are not disclosed. Training pairs are made on the fly: a clean 1024x1024 crop is degraded, downscaled, upsampled back to 1024 bicubically and encoded with the VAE, and the model learns to restore it.
Degradation. The base is the Real-ESRGAN approach of blur, noise, downscaling and compression, plus edge-preserving degradations for sharp contours and degradations made by a generative model, so the model can fix both real photos and typical flaws of generated images. The 4x mode trains on 8x downscaled images (1024 to 128 pixels), a harsher setting than at inference; 2x trains on a 4x downscale. Both share one set of weights, with one factor per batch.
Crop selection. Random crops often landed on flat background, so crops were chosen with the discriminator: a 1024-pixel window slides with a 512-pixel stride, each window is ranked by the mean discriminator score and heavily overlapping windows are dropped.
Five losses, computed in pixel space after VAE decoding: L1 for pixel match, DISTS for perceptual similarity, a GAN loss using a frozen DINOv3-ConvNeXt feature extractor with a trainable head, and two frequency losses against periodic artifacts. MFS compares Fourier amplitude spectra at harmonics of a 16-pixel grid; HFP compares Haar high-frequency components after the same random 0- or 1-pixel shift. Steps, batch size, learning rate, compute and how the 1x mode was trained are not disclosed.
What was tried for speed
The lab's optimization notes are candid. Baking the text and modulation layers replaced 2.20 GiB of FP32 parameters with 27.8 MiB of BF16 tables, with bit-identical output in 24 checks, shrinking the transformer from 9.55 to 7.39 GiB. Moving the VAE to a channels-last layout made it slower, CUDA Graphs and fused QKV stayed prototypes, compiling the VAE encoder can change fine detail and a 12.5% tile overlap can reveal tile boundaries.
Speed, memory and quality
On an H100, plain BF16 takes 0.33 s for 1x, 2.86 s for 2x and 7.96 s for 4x at 1024-pixel input, peaking at 11.22 GiB for 4x. Compilation plus FlashAttention-3 brings 4x down to 4.04 s, and the 3.95 GiB GGUF Q8_0 does it in 4.25 s with 5.92 GiB. Going from 2048 to 8192 pixels takes 19.56 s on one H100 and 11.88 s on two. The lab has published no quality scores such as PSNR or LPIPS and no comparison with other upscalers, only side-by-side examples against bicubic, so the best test is your own images.
How to try it
The quickest route is the Hugging Face demo. Locally, install with pip install git+https://github.com/kandinskylab/kandinsky-image-sr.git, load KandinskyImageSRPipeline.from_pretrained("kandinskylab/Kandinsky-ImageSR-2.0", dtype=torch.bfloat16) and set upscale_factor and creativity. There is an official ComfyUI node, kandinsky-imagesr, and a Q8_0 file in the GGUF repo for smaller cards. It needs a CUDA GPU with BF16 support.
Sources: Model card, GitHub, Technical blog (Russian), Model page, Optimization notes