Experiments›DDCM compression on the GPIC ladder
Dec 1, 2026

DDCM compression on the GPIC ladder

By Wenhao Chai作者 Wenhao Chai

Setup设置

DDCM (Denoising Diffusion Codebook Models, Ohayon et al., ICML 2025) turns a diffusion model into an image codec. A stochastic sampler adds fresh Gaussian noise at every step; DDCM replaces that noise by one of K fixed noises, drawn once from a seeded codebook. To compress an image, the encoder runs the sampler and, at each step, picks the index of the fixed noise best aligned with the residual between the image and the model's current estimate of it. The bitstream is these indices, (N − 1) × log2 K bits for N network calls, and the decoder runs the same sampler with the same codebook to rebuild the image.

DDCM(Denoising Diffusion Codebook Models,Ohayon 等,ICML 2025)把扩散模型变成图像编解码器。随机采样器每一步都加入新抽的高斯噪声;DDCM 把这个噪声换成 K 个固定噪声中的一个,这些噪声由带种子的码本一次抽好。压缩一张图时,编码器运行采样器,每一步选出与残差(原图减去模型当前对它的估计)最对齐的那个固定噪声的索引。码流就是这些索引:N 次网络调用共 (N − 1) × log2 K 比特。解码器用同一个码本运行同一个采样器,重建出这张图。

We run DDCM on our own text-to-image models, the final GPIC ladder: pixel-space diffusion transformers from d10 to d18, trained with 3.6e18 to 2.3e20 FLOPs, at 256×256 with CFG 1. The encoder and the decoder are both given the image's caption. Bits per pixel (bpp) are the index bits of an image divided by 65,536; the caption is counted separately, and only question 5 adds it. Question 1 shows four images from our earlier codec runs on the 1,000 held-out images that we use for the held-out loss.

我们在自己的文生图模型上运行 DDCM,即最终的 GPIC ladder:从 d10 到 d18 的像素空间扩散 transformer,训练算力从 3.6e18 到 2.3e20 FLOPs;分辨率 256×256,CFG 1。编码器和解码器都拿到这张图的描述。每像素比特数(bpp)等于一张图的索引比特数除以 65,536;描述的比特单独计算,只有问题 5 把它加进来。问题 1 展示之前编解码运行中的四张图,那次运行用的是计算留出损失的 1,000 张留出图像。

Questions 2 to 5 study one image: the poster, image 8 of the first eight held-out images (the last row of figure 1). On it we encode with d10, d12, d14, d16 and d18, with DDCM and with Turbo-DDCM (question 4), which sends several signed codebook noises per step. Each setting is encoded once, with codebook seed 0, on two A40 and one A100 GPUs that other jobs also used, so every time on this page is an upper bound. One image cannot say how a setting does on average; it can say only which differences exceed the noise of a single encode.

问题 2 到 5 只研究一张图:海报,即前八张留出图像中的第 8 张(图 1 的最后一行)。我们用 d10、d12、d14、d16 和 d18 编码这张图,方法有 DDCM 和 Turbo-DDCM(问题 4);Turbo-DDCM 每步发送多个带符号的码本噪声。每个设置只编码一次,码本种子为 0,运行在两块 A40 和一块 A100 GPU 上;这些 GPU 同时有别的任务,所以本页的所有时间都只是上界。一张图说明不了一个设置的平均表现,只能说明哪些差别大于单次编码的噪声。

To measure that noise, we encoded six settings of d12 with three codebook seeds; a change of GPU type also changes the codebook, and these runs include it. The standard deviation of PSNR is 0.3 to 0.6 dB below 0.01 bpp and 0.1 to 0.2 dB above 0.04 bpp. Differences smaller than these are not resolved on this page.

为了测量这个噪声,我们把 d12 的六个设置各用三个码本种子编码;换一种 GPU 也会改变码本,这些运行包含了这个效应。PSNR 的标准差在 0.01 bpp 以下是 0.3 到 0.6 dB,在 0.04 bpp 以上是 0.1 到 0.2 dB。小于这些值的差别,本页不作判断。

Setting, d12设置,d12bppPSNR, dBLPIPSDINOv2 distanceDINOv2 距离
DDCM, N = 10, K = 2560.001111.14 ± 0.260.741 ± 0.0780.792 ± 0.106
DDCM, N = 30, K = 4,0960.005314.32 ± 0.580.573 ± 0.0350.781 ± 0.091
DDCM, N = 50, K = 2560.006014.81 ± 0.600.545 ± 0.0550.770 ± 0.084
Turbo-DDCM, T = 30, M = 8, D = 00.046525.31 ± 0.180.171 ± 0.0010.310 ± 0.025
DDCM, N = 300, K = 4,0960.054726.43 ± 0.120.124 ± 0.0100.280 ± 0.039
Turbo-DDCM, T = 30, M = 16, D = 100.056826.77 ± 0.120.106 ± 0.0070.269 ± 0.043

Mean ± standard deviation over codebook seeds 0, 1 and 2, on the poster.

海报图上,码本种子 0、1、2 的均值 ± 标准差。

Experiments实验

Answered已有结论What do the reconstructions look like?重建出来的图是什么样子?

At 0.0060 bpp they are new images of the caption: its objects and colours, but not the original's layout. From 0.0365 bpp they keep the layout, and the larger models keep more of the text and the faces; WebP at the same bits is a blur.

0.0060 bpp 时,重建图是按描述新生成的图:物体和颜色对得上,但构图和原图不同。从 0.0365 bpp 起,构图保留下来,更大的模型保留更多的文字和人脸;相同比特数下的 WebP 只是一片模糊。

One image一张图Is a bigger model better?模型越大越好吗?

On the poster, yes, above 0.01 bpp. At 0.05 bpp and above, PSNR rises with every size, by 1.5 to 1.8 dB from d10 to d18, but d16 and d18 are equal. Below 0.01 bpp the sizes are within 0.8 dB of each other, which the noise floor does not resolve.

在海报这张图上,0.01 bpp 以上是。0.05 bpp 及以上,PSNR 随大小逐级上升,从 d10 到 d18 高 1.5 到 1.8 dB,但 d16 与 d18 相同。0.01 bpp 以下,各大小之间相差不超过 0.8 dB,这个差别在噪声底以内,无法分辨。

One image一张图More steps or a larger codebook?更多步数,还是更大的码本?

On the poster, a larger codebook, up to 8 to 16 bits per step. At equal bits, one bit per step is always the worst split. More steps pay only when they carry more bits: with no bit limit the decoder peaks at 30 to 50 calls, far above every real code. Turbo-DDCM needs only 15 calls at 0.05 bpp and above.

在海报这张图上,选更大的码本,到每步 8 到 16 比特为止。比特数相同时,每步 1 比特总是最差的分法。只有多出的步数带来更多比特时,步数才有用:没有比特限制时,解码器在 30 到 50 次调用时最好,远高于任何实际编码。0.05 bpp 及以上,Turbo-DDCM 只需 15 次调用。

One image一张图A better selection rule更好的选择规则

On the poster, yes. Turbo-DDCM picks M of K = 16,384 codebook noises at each step, each with a + or − sign, and sends the set and the signs as one index of ⌈log2 C(K, M)⌉ + M bits. Its last D steps are plain DDIM steps that send no bits. From 0.015 to 0.23 bpp it is 0.1 to 3.5 dB above DDCM (1.9 dB on average) with 20 to 30 network calls instead of 300 to 1,000; below 0.012 bpp the two are equal.

在海报这张图上,是。Turbo-DDCM 每一步从 K = 16,384 个码本噪声中选出 M 个,每个带 + 或 − 号,并把这组噪声和符号编成一个索引,每步 ⌈log2 C(K, M)⌉ + M 比特。最后 D 步是普通的 DDIM 步,不发送比特。在 0.015 到 0.23 bpp,它比 DDCM 高 0.1 到 3.5 dB(平均 1.9 dB),只用 20 到 30 次网络调用,而 DDCM 要 300 到 1,000 次;0.012 bpp 以下两者相同。

One image一张图Is the caption worth its bits?描述值得它的比特吗?

On the poster, not below 0.07 bpp. The caption costs 960 bits (0.0146 bpp). At the same total bits, coding without it gives 0.7 to 5.4 dB more PSNR from 0.019 to 0.055 bpp, at all five sizes; from 0.07 bpp up the two are within 0.7 dB. Only the DINOv2 distance favours the caption.

在海报这张图上,0.07 bpp 以下不值得。描述要 960 比特(0.0146 bpp)。总比特数相同时,在 0.019 到 0.055 bpp,不带描述的编码 PSNR 高 0.7 到 5.4 dB,五个大小都是如此;0.07 bpp 以上两者相差不超过 0.7 dB。只有 DINOv2 距离偏向带描述。

Acknowledgements致谢

The author is pleased to acknowledge that the work reported on in this post was substantially performed using the Princeton Research Computing resources at Princeton University. Princeton Research Computing is a consortium of groups including the Princeton Institute for Computational Science and Engineering (PICSciE) and Research Computing at Princeton University.

本文报告的工作主要使用普林斯顿大学 Princeton Research Computing 的计算资源完成。Princeton Research Computing 是由普林斯顿计算科学与工程研究所(PICSciE)和普林斯顿大学 Research Computing 等团队组成的联合体。

Citation

@misc{chai2026ddcmcodec,
  title        = {DDCM compression on the GPIC ladder},
  author       = {Chai, Wenhao},
  year         = {2026},
  howpublished = {Blog post},
  url          = {https://wenhaochai.com/exps/ddcm-codec.html}
}
Experiments Back to top回到顶部