Nanjing University's DiT-IC Decodes 4K Images 30x Faster Than Diffusion Codecs
A new codec swaps the U-Net for a Diffusion Transformer, delivering 30x faster decoding and 2K reconstruction on a 16GB laptop GPU.
ProTakeaways
- DiT-IC replaces the U-Net in diffusion codecs with a Diffusion Transformer operating in a 32x downscaled latent space
- Three alignment mechanisms convert a pretrained SANA DiT into a one-step reconstruction model with no text encoder needed
- Achieves up to 30x faster decoding versus existing diffusion codecs at comparable or better perceptual quality
- Can reconstruct 2048x2048 images on a 16 GB laptop GPU; INT8 quantization drops memory to ~4 GB
- Won 56.8% of votes in a 61-participant user study against ResULIC, PerCo, StableCodec, and OSCAR
- Accepted to CVPR 2026; code and checkpoints released at github.com/Eric-qi/DiT-IC
Diffusion-based image compression produces reconstructions that look strikingly natural at ultra-low bitrates, but it has been stuck with a nasty tradeoff: the perceptual quality comes at the cost of slow decoding and heavy memory. A team from Nanjing University is trying to break that tradeoff with DiT-IC, a compression codec that swaps the traditional U-Net for a Diffusion Transformer and runs the entire diffusion process in a deeply compressed latent space.
The results, accepted to CVPR 2026, are notable: up to 30x faster decoding and substantially lower memory usage than existing diffusion-based codecs, with the model able to reconstruct 2048x2048 images on a 16 GB laptop GPU. Code and pretrained checkpoints are already available on GitHub.

Why diffusion codecs have been stuck in shallow water
The bottleneck comes from architecture. Most existing diffusion codecs employ U-Net architectures, where hierarchical downsampling forces diffusion to operate in shallow latent spaces (typically with only 8x spatial downscaling), resulting in excessive computation. Meanwhile, standard VAE-based learned codecs comfortably work at 16x to 64x downscaling. That gap is where all the wasted compute lives.
The authors argue that Diffusion Transformers (DiTs) are structurally a better fit. Unlike U-Nets, DiTs replace the U-Net with a Diffusion Transformer capable of performing diffusion in latent space entirely at 32x downscaled resolution. Since transformer blocks keep spatial resolution constant, they don't fight against a deep latent the way a hierarchical U-Net does.
But you can't just drop a pretrained text-to-image DiT like SANA into a codec and expect it to work. Text-to-image diffusion starts from pure Gaussian noise and iterates. Compression starts from a quantized latent that is already close to the target image. That mismatch is what DiT-IC tries to fix.
Three alignment tricks that collapse diffusion into one step
The paper's core contribution is a set of three alignment mechanisms that adapt a generative multi-step DiT into a one-step reconstruction model.
- Variance-guided reconstruction flow. Compression noise isn't uniform: smooth sky pixels are nearly clean, while textured foliage carries much more residual noise. Instead of using a single global denoising timestep, DiT-IC maps the per-pixel latent variance (which the entropy model already predicts) to a per-pixel pseudo-timestep. High variance means more denoising, low variance means less. This collapses iterative denoising into a single spatially adaptive transformation.
- Self-distillation alignment. Standard diffusion distillation needs a teacher model that provides intermediate denoising trajectories. That doesn't exist for a fresh compression latent space. The workaround: freeze the encoder and treat its output as an internal reference, then push the DiT's one-step prediction to match it via a cosine alignment loss. This is efficient fine-tuning via proposed alignment mechanisms, significantly accelerating training and avoids needing an external teacher.
- Latent-conditioned guidance. Pretrained DiTs like SANA lean on a big text encoder for conditioning. That's expensive and irrelevant for reconstruction. DiT-IC learns a lightweight projection from the compressed latent into the DiT's text embedding space, and uses a CLIP-style contrastive loss during training to keep those two aligned. At inference, the text encoder is dropped entirely.

How it is actually built
The system pairs a SANA-VAE backbone with SANA as the diffusion transformer, and borrows ELIC as an auxiliary encoder. Rather than full fine-tuning, the authors insert LoRA adapters (rank 32 on the VAE decoder, rank 64 on the DiT), which turned out to work better than either training from scratch or full fine-tuning. Training runs in two stages on roughly 150K high-resolution images: a rate-distortion phase, followed by a fine-tuning stage that adds an adversarial loss for perceptual sharpness.
The entropy model uses the familiar hyperprior plus autoregressive context setup from StableCodec, but with the heavy context modules replaced by lightweight DepthConvBlocks. And critically, the DiT drops positional encodings (NoPE), which the authors credit for letting a model trained on 256x256 patches generalize cleanly to 2K and 4K images without retraining.
Benchmarks and where the speedup actually shows up
DiT-IC was evaluated on Kodak, CLIC 2020, and DIV2K. On BD-rate against the PerCo baseline, DiT-IC hits -81% to -86% on LPIPS and up to -94% on DISTS, edging out StableCodec across all three datasets. In a user study of 61 participants comparing DiT-IC to ResULIC, PerCo, StableCodec, and OSCAR, DiT-IC was picked as most realistic 56.8% of the time.
The latency story is where the architectural choice pays off. At 1024x1024 the diffusion step drops by roughly 50% versus StableCodec, and at 2048x2048 by about 85%. At 4K, StableCodec's latency balloons past 85 seconds while DiT-IC stays around 3.3s, a benefit the authors attribute to fewer memory transfers in the deeper latent. Four operating points (quality=1,2,3,4) achieve approximate bitrates of 0.009, 0.044, 0.081, and 0.100 bpp on the Kodak dataset.
Where it is useful, and where it breaks
This is a codec aimed at low and ultra-low bitrate settings, roughly 0.01 to 0.1 bpp, where perceptual fidelity matters more than pixel-perfect PSNR. Realistic scenarios:
- Bandwidth-constrained image delivery where perceptual quality beats faithful pixels
- Storage of large photo archives at aggressive compression ratios
- On-device decoding on laptops or workstations without server-grade GPUs
The limitations are real. Like all perception-focused codecs, DiT-IC trades PSNR for perceptual metrics; the rate-distortion-perception principle guarantees you can't have both. The authors also flag that at extremely low bitrates (below 0.01 bpp) the latent alone starts to run out of semantic information, and auxiliary text priors may still be needed. And diffusion-based codecs remain prone to occasional semantic hallucinations, like changing a boat's number or window pattern, though DiT-IC appears to hallucinate less than its peers.
Getting it running
The official repository ships inference and training scripts, with checkpoints released on HuggingFace. Requirements are Python 3.12, PyTorch 2.8, and CompressAI 1.2.8 (the last one matters because BPP calculations depend on it). Inference is a single command:
python compress.py \
--config_path="configs/inference_merge.yaml" \
--codec_path="checkpoints/q3_merge_ema.pt" \
--img_path="/data/Kodak" \
--rec_path="results/Kodak/rec/" \
--bin_path="results/Kodak/bin/" \
--use_mergeThe released checkpoints have LoRA weights pre-merged into the base model for faster inference, and the authors note that with 1024x1024 tiled decoding, peak memory drops below 7 GB. INT8 quantization brings that down to around 4 GB, putting real-time perceptual compression within reach of consumer GPUs for the first time.