CoD: A Diffusion Foundation Model for Image Compression

Zhaoyang Jia, Zihan Zheng, Naifu Xue, Jiahao Li, Bin Li, Zongyu Guo, Xiaoyi Zhang, Houqiang Li, Yan Lu

TL;DR

CoD (Compression-oriented Diffusion) is the first diffusion foundation model trained from scratch specifically for image compression rather than text-to-image generation. By replacing text conditions with end-to-end learned native image tokens, CoD achieves state-of-the-art compression efficiency at ultra-low bitrates while requiring just 0.3% of the training cost of Stable Diffusion.

What Problem Does This Paper Address?

Recent generative image compression methods heavily rely on pretrained text-to-image diffusion models like Stable Diffusion to achieve highly realistic image reconstructions. However, the authors argue that text conditioning is fundamentally suboptimal for compression.

First, human-written text captions cannot efficiently capture fine-grained spatial and texture details. Second, discrete text vocabularies are non-differentiable, which prevents joint end-to-end optimization of the image encoder and the diffusion decoder. Additionally, foundation models like Stable Diffusion are trained on massive, proprietary datasets and require thousands of GPU days, making them incredibly expensive and difficult to reproduce or customize for compression tasks.

Figure 1. Overview of Compression-oriented Diffusion (CoD) foundation models, which are trained from scratch to jointly optimize compression and generation. Rather than a fixed codec, CoD serves as a foundational model for downstream diffusion-based codecs such as DiffC [40], substantially enhancing their performance by replacing Stable Diffusion.

Methods

The authors introduce CoD, a foundation model trained from scratch using Rectified Flow (RF) instead of standard DDPM (Denoising Diffusion Probabilistic Models). The pipeline consists of:

  1. Condition Encoder: Compresses the input image into compact, native image tokens.
  2. Entropy Bottleneck: Enforces an ultra-low bitrate (e.g., 0.0039 bpp) to push the diffusion model to learn strong generative priors.
  3. Condition Decoder: Reconstructs intermediate compression conditions from the tokens.
  4. Diffusion Module: Denoises a randomly sampled Gaussian noise guided by the learned native image conditions.

CoD is implemented in both latent-space (operating within a VAE) and pixel-space (directly modeling raw pixels).

To bridge the gap between perception and distortion, they propose Unified Training with Rectified Flow. Standard diffusion training optimizes for perceptual distribution matching but ignores pixel-level distortion, often leading to severe color shifts. CoD solves this by mixing standard rectified flow loss ($\alpha\%$ of samples across all timesteps) with a one-step distortion loss ($1-\alpha\%$ of samples evaluated strictly at $t=0$), forcing the model to preserve both structural and color fidelity.

Figure 3. Effects of unified training with rectified flow.

Datasets

  • Training: ImageNet-21K, OpenImages, and SA-1B, totaling 22 million images. Crucially, these are entirely open, image-only datasets that do not require text captions.
  • Evaluation: Kodak, CLIC2020 test set, and Div2K.

Key Insights and Ideas

  • Text is a Bottleneck: Moving from human-defined text descriptions to end-to-end learned native image tokens dramatically improves reconstruction fidelity and allows true rate-distortion optimization.
  • Surprisingly Low Training Cost: Training a compression foundation model from scratch doesn't require thousands of GPU days. CoD takes only ~20 A100 GPU days—just 0.3% of Stable Diffusion v1.5's training cost (~6,250 days)—making it highly reproducible for researchers.
  • Pixel-Space Diffusion Vindicated: While recent trends favor latent-space diffusion, latent models are fundamentally capped by the reconstruction limit of their underlying VAE. Pixel-space CoD breaks through this ceiling, scaling smoothly to high bitrates (up to 4 bpp) and achieving traditional codec-level PSNR.
  • Algorithmic Gains Over Model Size: Scaling laws show that while larger CoD models perform better, even a tiny 49M parameter CoD model outperforms a 181M parameter GAN-based codec (MS-ILLM), proving that diffusion's advantages are algorithmic, not just a byproduct of massive scale.

Key Results

  • Ultra-low Bitrate SOTA: Integrating CoD into downstream frameworks like DiffC yields state-of-the-art results, particularly at ultra-low bitrates (e.g., 0.0039 bpp).
  • VTM-Level Fidelity: Pixel-space CoD achieves a -2.1% BD-Rate compared to the traditional VTM (Versatile Video Coding) codec in terms of PSNR, while offering vastly superior perceptual quality (measured via FID and DISTS).
  • Zero-Shot Distortion-Perception Control: Thanks to the unified training strategy, users can smoothly trade off distortion and perception at inference time simply by changing the number of sampling steps (fewer steps yield lower distortion/higher PSNR, while more steps enhance perceptual realism).

Limitations and Future Work

  • Resolution Limits: CoD has not yet been trained or optimized for high-resolution inputs (e.g., 2K or 4K images).
  • Inference Speed: Like most diffusion models, CoD requires iterative sampling steps and does not yet meet real-time coding requirements. The authors point to diffusion distillation as a promising future direction to achieve real-time speeds.

Summary updated

BibTeX
@inproceedings{jia2026cod,
  author = {Zhaoyang Jia and Zihan Zheng and Naifu Xue and Jiahao Li and Bin Li and Zongyu Guo and Xiaoyi Zhang and Houqiang Li and Yan Lu},
  title = {{CoD: A Diffusion Foundation Model for Image Compression}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=rWjIel319C},
}
Figure