Patched Denoising Diffusion Models For High-Resolution Image Synthesis

Zheng Ding, Mengqi Zhang, Jiajun Wu, Zhuowen Tu

Abstract

We propose an effective denoising diffusion model for generating high-resolution images (e.g., 1024×512), trained on small-size image patches (e.g., 64×64). We name our algorithm Patch-DM, in which a new feature collage strategy is designed to avoid the boundary artifact when synthesizing large-size images. Feature collage systematically crops and combines partial features of the neighboring patches to predict the features of a shifted image patch, allowing the seamless generation of the entire image due to the overlap in the patch feature space. Patch-DM produces high-quality image synthesis results on our newly collected dataset of nature images (1024×512), as well as on standard benchmarks of smaller sizes (256×256), including LSUN-Bedroom, LSUN-Church, and FFHQ. We compare our method with previous patch-based generation methods and achieve state-of-the-art FID scores on all four datasets. Further, Patch-DM also reduces memory complexity compared to the classic diffusion models.

Introduction

Generating high-resolution images with Denoising Diffusion Probabilistic Models (DDPMs) is notoriously resource-intensive. Because standard diffusion models operate on the entire image at once, the memory and computational costs scale quadratically with resolution. Current workarounds usually involve two-stage pipelines: generating a low-res "base" image and then using a separate super-resolution model to upscale it.

While patch-based generation (training on small pieces of an image) seems like an obvious solution to save memory, it historically suffers from "boundary artifacts"—visible seams or inconsistencies where the patches meet. Patch-DM addresses this by creating a framework that is lightweight enough to run on patches while maintaining global and local consistency.

Methodology

Patch-DM introduces two main components to solve the patch-consistency problem:

Feature Collage Strategy

Instead of simply stitching pixels together, Patch-DM operates in the "feature space" of a U-Net. During the denoising process, the model takes features from four neighboring patches, crops them, and combines them to predict the noise for a "shifted" patch. This overlap ensures that the internal representations of adjacent patches are mathematically forced to be consistent, eliminating the "grid" look common in patch-based methods.

Comparison of collage strategies: (a) Collage on Patches, (b) Patch Collage in Pixel Space, and (c) the proposed Patch Collage in Feature Space.

Global Conditioning

To ensure that a patch in the top-left corner of a landscape knows there should be a mountain in the bottom-right, the model uses global semantic and positional embeddings:

  • Global Semantic Code: For high-res images, a pre-trained CLIP (ViT-B/16) encoder provides a "global code" that guides the overall composition.
  • Positional Embeddings: Sinusoidal positional embeddings allow the model to know exactly where each 64x64 patch sits within the larger canvas (e.g., 1024x512).

Results and Evaluation

The authors evaluated Patch-DM on several benchmarks, including a newly collected dataset of 21,443 high-resolution (1024x512) natural landscapes, as well as standard 256x256 benchmarks like FFHQ, LSUN-Bedroom, and LSUN-Church.

A high-resolution (1024x512) landscape generated by Patch-DM, demonstrating seamless synthesis across patches.

Performance and Efficiency

  • State-of-the-Art (SOTA): On the 1024x512 Nature dataset, Patch-DM achieved an FID score of 20.369, significantly outperforming previous patch-based methods like COCO-GAN (70.98) and Anyres-GAN (44.17).
  • Memory Efficiency: The model achieves high-quality results with only 148M parameters, whereas direct-generation models like ADM often require over 550M parameters to handle high resolutions. By training on 64x64 patches, Patch-DM reduces memory complexity significantly, making high-res synthesis accessible on consumer-grade hardware.

Discussion and Conclusion

Patch-DM demonstrates that shifting windows at the feature level (inside the U-Net) is far more effective at preventing artifacts than shifting windows at the pixel level. This feature-level interaction allows the model to be cognizant of its neighbors' context before the final image is rendered.

Furthermore, the architecture is resolution-agnostic; because the U-Net only ever processes 64x64 patches, the model can generate larger images by simply adding more patches and adjusting positional embeddings. Beyond standard generation, Patch-DM is capable of outpainting, inpainting, and even beyond-boundary generation (e.g., generating 2048x1024 images from 1024x512 training data) without additional training.

Summary updated

BibTeX
@inproceedings{ding2024patched,
  author = {Zheng Ding and Mengqi Zhang and Jiajun Wu and Zhuowen Tu},
  title = {{Patched Denoising Diffusion Models For High-Resolution Image Synthesis}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=TgSRPRz8cI},
}
Figure