CoD-Lite: Real-Time Diffusion-Based Generative Image Compression
Organizations: University of Science and Technology of China · Communication University of China · Microsoft Research Asia
Abstract
Recent advanced diffusion methods typically derive strong generative priors by scaling diffusion transformers. However, scaling fails to generalize when adapted for real-time compression scenarios that demand lightweight models. In this paper, we explore the design of real-time and lightweight diffusion codecs by addressing two pivotal questions. First, does diffusion pre-training benefit lightweight diffusion codecs? Through systematic analysis, we find that generation-oriented pre-training is less effective at small model scales whereas compression-oriented pre-training yields consistently better performance. Second, are transformers essential? We find that while global attention is crucial for standard generation, lightweight convolutions suffice for compression-oriented diffusion when paired with distillation. Guided by these findings, we establish a one-step lightweight convolution diffusion codec that achieves real-time ~FPS encoding and ~FPS decoding at 1080p. Further enhanced by distillation and adversarial learning, the proposed codec reduces bitrate by 85% at a comparable FID to MS-ILLM, bridging the gap between generative compression and practical real-time deployment. Codes are released at https://github.com/microsoft/GenCodec/tree/main/CoD_Lite
Figures & tables
| Enc. / Dec. Time (ms) | |||
|---|---|---|---|
| NVIDIA A100 GPU | 6 / 13 | 16 / 24 | 63 / 75 |
| NVIDIA RTX 2080Ti GPU | 9 / 21 | 46 / 47 | 200 / 208 |
| AMD EPYC 9V84 Processor | 58 / 65 | 287 / 202 | 1343 / 837 |
| Module | Encoder | Decoder | Lite Diff. CNN | Pixel Head |
|---|---|---|---|---|
| Parameters | 28.1 M | 10.9 M | 37.9 M | 3.2 M |
| kMACs / pixel | 325 | 43 | 138 | 29 |
| Runtime@ | 15.5 ms | 2.1 ms | 14.5 ms | 6.2 ms |
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| Stage | Image Resolution | BPP | #Images | Training Steps | Batch Size | Learning Rate | GPU hours (A100) |
|---|---|---|---|---|---|---|---|
| Low-Resolution Pre-Training | 0.0156 bpp | 22.1M | 600 K | ||||
| High-Resolution Pre-Training | 0.0039 bpp | 12.8 M | 100 K | ||||
| Unified Post-Training | 0.0039 bpp | 12.8 M | 50 K | ||||
| Reconstruction Fine-Tuning | Target bpp | 12.8 M | 200 K | ||||
| Dist. & Adv. Fine-Tuning | Target bpp | 12.8 M | 200 K |