arXiv:2610.18125cs.CVOct 2026

Manuscript Offprint

arXiv:2610.18125

H-DDCM: Hadamard Codebooks for Fast Generative Image and Video Compression

Or Ronai, Vladimir Kulikov, Tomer Michaeli

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Training-free diffusion-based compression methods repurpose the generative priors of a diffusion or a flow model to compress data without retraining them as task-specific codecs. Recent codebook-based approaches such as Turbo-DDCM achieve strong perceptual quality at ultra-low bitrates, but their reliance on dense Gaussian codebooks remains costly in both memory and computation, and scales poorly with the large latent dimensions of modern image and video generators. Their combinatorial bitstream encoding further becomes computationally heavy at this scale. We introduce H-DDCM, a scalable generative compression framework that replaces Gaussian codebooks with implicit randomized Hadamard dictionaries. The fast Walsh-Hadamard transform allows for implicitly synthesizing full-dimensional dictionaries with O(dlog⁡d)O(d \log d) compute for projection and reconstruction and O(d)O(d) memory, without materializing the full-dimensional dictionary. We further introduce an efficient table-free lexicographic coding scheme that makes combinatorial encoding practical at larger dimensions. Beyond images, we adapt the framework to an autoregressive video flow model and develop a streaming compression scheme that periodically re-encodes recently reconstructed frames into a fresh KV-cache prefix, preserving temporal context across segments at no additional transmitted bits. This enables long-form, close to real-time generative video compression on a single GPU. Across image and video benchmarks, H-DDCM achieves competitive rate-distortion-perception performance while substantially reducing the memory and computational overhead of codebook-based training-free generative compression.

1 INTRODUCTION

Generative priors have become increasingly important for low-bitrate image and video compression, where reconstructing perceptually plausible content can be preferable to preserving every pixel accurately. Early generative codecs were based on GANs (Goodfellow et al., 2020; Agustsson et al., 2019; Mentzer et al., 2020), while more recent methods exploit the stronger priors of diffusion (Sohl-Dickstein et al., 2015; Ho et al., 2020; Song et al., 2021b) and flow models (Lipman et al., 2023; Liu et al., 2023; Albergo et al., 2025). Most such approaches train or fine-tune the generative model specifically for compression (Yang & Mandt, 2023; Careil et al., 2024; Körber, 2024; Zhang & Wu, 2026; Mao et al., 2026), tying the codec to a particular backbone. In contrast, training-free diffusion compression leaves a pretrained generator frozen and encodes information directly into its sampling trajectory. Denoising Diffusion Codebook Models (DDCM) (Ohayon et al., 2025) realize this idea by replacing the random noise at each denoising step with a noise map selected from a K-atom Gaussian codebook shared by the encoder and decoder. The encoder selects the codeword that best aligns with the residual between the target and the model's current clean prediction and transmits only its index; the decoder regenerates the same codeword and thereby follows the encoded denoising trajectory. Turbo-DDCM (Vaisman et al., 2026) substantially accelerates this procedure by selecting and combining multiple codebook atoms in closed form at each step, producing a noise map better aligned with the residual and cutting the expensive denoising steps by over 90%.

†^{\dagger}Equal contribution.

Despite this acceleration, Turbo-DDCM remains difficult to scale to the high-dimensional latent spaces of modern generative models. Its Gaussian codebook must either be stored or regenerated, and residual matching requires dense operations whose cost grows with both the latent dimension and codebook size. Restricting the codebook reduces this cost but also limits the set of residual directions available to the encoder. A complete codebook becomes particularly problematic at modern scales, i.e., for large image latents such as FLUX (Black Forest Labs, 2024), it already requires approximately 128 GiB of storage, while video latents such as those used by Causal-Forcing (CF) (Zhu et al., 2026) require roughly 167 GiB. These costs turn the codebook itself into a major computational and memory bottleneck, limiting the applicability of training-free generative compression precisely for the large image and fast video backbones where it is most attractive.

In this work, we address these limitations through three main contributions. First, we replace dense Gaussian codebooks with structured randomized Hadamard dictionaries. Turbo-DDCM only accesses its codebook to correlate candidate atoms with the current residual and to reconstruct the selected combination; both operations can therefore be replaced by fast matrix-vector products. A randomized Hadamard transform provides these operations implicitly, without materializing the dictionary, reducing the computation to O(dlog⁡d)O(d \log d) and memory to O(d)O(d). Moreover, while Turbo-DDCM relies on the approximate orthogonality of high-dimensional Gaussian atoms, the Hadamard basis is exactly orthogonal, making its top-M candidate thresholding rule optimal for the orthogonal Hadamard representation. We further extend this construction to an overcomplete structured dictionary, combining multiple independently randomized Hadamard bases to expose an even richer set of candidate directions while retaining the fast implicit projections.

Second, we address a separate computational bottleneck in the transmitted bitstream. Turbo-DDCM exploits the fact that the M selected codebook indices form an unordered subset and encodes this subset through a lexicographic rank, reducing the index cost from independently transmitting M indices to ⌈log⁡2(dM)⌉\lceil \log_2 \binom{d}{M} \rceil bits. However, its implementation relies on a dense precomputed combinatorial table whose construction and memory requirements become impractical at the higher dimensions considered here. We develop a table-free lexicographic encoder and decoder, together with a grouping protocol that bounds the size of individual combinatorial operations. This retains the bit savings of the combinatorial coding while ensuring practical runtime at large latent dimensions.

Finally, we extend the framework to close to real-time autoregressive (AR) video compression. We adapt Causal-Forcing, a fast causal AR video flow model, into a streaming generative codec. To additionally compress beyond the model's native context length without periodically discarding temporal context, we introduce a re-encoded-tail cache refresh: at each continuation boundary, recently reconstructed frames are re-encoded into a fresh KV-cache prefix, providing the next segment with temporal context at no additional transmitted bits. Together, these components enable scalable streaming compression on a single GPU. On images, our structured dictionary matches the fidelity of complete-codebook Turbo-DDCM without materializing the corresponding codebook; on video, our streaming codec achieves competitive rate-distortion-perception performance while providing the highest measured throughput among the evaluated methods sharing the CF backbone.

References (56)