CoD-Lite: Real-Time Diffusion-Based Generative Image Compression

arXiv GitHub CoD Base

CoD-Lite is a real-time, lightweight diffusion-based image codec. Unlike prior diffusion codecs that rely on billion-parameter foundation models and multi-step sampling, CoD-Lite achieves competitive perceptual quality with a compact architecture (28M encoder + 52M decoder) and one-step decoding, enabling 60 FPS encoding and 42 FPS decoding at 1080p on a single A100 GPU.

Key Insights

For real-time performance:

  1. Light 52M decoder — orders of magnitude smaller than existing diffusion codecs.
  2. Convolutional diffusion to replace time-consuming DiTs.
  3. Pixel-space diffusion to avoid VAE decoding.
  4. One-step diffusion to avoid iterative sampling.

For maintaining compression quality:

  1. Compression-oriented diffusion pre-training (CoD) is uniquely effective for lightweight models.
  2. Distillation-guided and adversarial one-step fine-tuning to significantly improve performance.

Available Models

Pre-trained CoD-Lite

Model Checkpoint
CoD-Lite (pre-trained) CoD_Lite_pretrain.pt

One-Step Codec at Various Bitrates

Coding Speed

All runtimes measured at 0.0312 bpp.

Device 720x480 (Enc/Dec) 1920x1024 (Enc/Dec) 3840x2160 (Enc/Dec)
NVIDIA A100 GPU 6 / 13 ms 16 / 24 ms 63 / 75 ms
NVIDIA RTX 2080Ti GPU 9 / 21 ms 46 / 47 ms 200 / 208 ms
AMD EPYC 9V84 CPU 58 / 65 ms 287 / 202 ms 1343 / 837 ms

Quick Start

Installation

git clone https://github.com/microsoft/GenCodec.git
cd GenCodec/CoD_Lite
conda create -n cod_lite python=3.12
conda activate cod_lite
pip install -r requirements.txt

Download Checkpoints

# Download all CoD-Lite models
huggingface-cli download zhaoyangjia/CoD_Lite --local-dir ./pretrained/CoD_Lite

# Download a specific bitrate model
huggingface-cli download zhaoyangjia/CoD_Lite CoD_Lite_bpp_0_0312.pt CoD_Lite_bpp_0_0312.yaml --local-dir ./pretrained/CoD_Lite

Compress

Encode images into .cod bitstreams:

python -m finetuned_one_step_codec.inference compress \
    --ckpt ./pretrained/CoD_Lite/CoD_Lite_bpp_0_0312.pt \
    --config ./pretrained/CoD_Lite/CoD_Lite_bpp_0_0312.yaml \
    --input <image_dir> --output <bitstream_dir>

Decompress

Decode .cod bitstreams back to images:

python -m finetuned_one_step_codec.inference decompress \
    --ckpt ./pretrained/CoD_Lite/CoD_Lite_bpp_0_0312.pt \
    --config ./pretrained/CoD_Lite/CoD_Lite_bpp_0_0312.yaml \
    --input <bitstream_dir> --output <recon_dir>

End-to-End Evaluate

Compress and decompress in a single pass:

python -m finetuned_one_step_codec.inference evaluate \
    --ckpt ./pretrained/CoD_Lite/CoD_Lite_bpp_0_0312.pt \
    --config ./pretrained/CoD_Lite/CoD_Lite_bpp_0_0312.yaml \
    --input <image_dir> --output <recon_dir>

Citation

@article{jia2026codlite,
    title     = {Real-Time Diffusion-Based Generative Image Compression},
    author    = {Jia, Zhaoyang and Xue, Naifu and Zheng, Zihan and Li, Jiahao and Li, Bin and Zhang, Xiaoyi and Guo, Zongyu and Zhang, Yuan and Li, Houqiang and Lu, Yan},
    journal   = {arXiv preprint arXiv:2604.12525},
    year      = {2026}
}

License

MIT

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including zhaoyangjia/CoD_Lite

Paper for zhaoyangjia/CoD_Lite