ElasticDiffusion: Training-Free Arbitrary Size Image Generation Through Global-Local Content Separation

Moayed Haji-Ali, Guha Balakrishnan, Vicente Ordonez

Introduction

Most popular diffusion models, such as Stable Diffusion (SD), are "resolution-locked," typically trained on fixed 512x512 square images. When tasked with generating images at larger scales or non-standard aspect ratios, these models often suffer from "object repetition"—producing six-legged animals or tiled landscapes—because their internal receptive fields lack a global understanding of the expanded canvas. ElasticDiffusion introduces a novel, training-free decoding strategy that enables these models to generate high-quality, coherent images of any size or aspect ratio without additional training.

ElasticDiffusion enables the generation of diverse content at various aspect ratios and resolutions, far exceeding the native 512x512 training size of the base model.

Methodology: Global-Local Content Separation

The core innovation of ElasticDiffusion is the decoupling of the denoising process into two distinct signals: local details and global structure.

  1. The Local Signal (Unconditional Score): This component controls low-level textures and fine details. The authors observed that this signal is inherently local and does not require a full view of the image to be accurate. ElasticDiffusion computes this signal on small, non-overlapping patches. To prevent visible seams, a "patch fusion" technique incorporates context pixels from adjacent areas.
  2. The Global Signal (Class-Direction Score): This dictates the overall composition and semantic structure (e.g., the placement of a subject). This signal requires a global perspective. ElasticDiffusion estimates it by downsampling the large latent image to the model's native resolution (512x512), calculating the guidance, and then upsampling it back to the target size.
The ElasticDiffusion architecture, illustrating the parallel processing of local content via patching and global content via downsampling and upsampling.

To further stabilize generation, the researchers introduced Reduced-Resolution Guidance (RRG). This technique ensures the high-resolution image remains aligned with a lower-resolution "reference" version during denoising, acting as a structural anchor that prevents artifacts as resolution increases.

Key Results and Efficiency

ElasticDiffusion was evaluated using the CelebA-HQ and LAION-COCO datasets. It successfully avoids the repetition artifacts common in standard SD and MultiDiffusion at high resolutions.

  • Quantitative Performance: On LAION-COCO at 1024x1024, ElasticDiffusion achieved an FID score of 228.87, outperforming both SDXL (230.21) and standard SD 1.4 (266.01).
  • Resource Efficiency: ElasticDiffusion is remarkably efficient, requiring only approximately 31% of the memory used by SDXL for 1024x1024 generation. This makes high-resolution synthesis more accessible on consumer-grade hardware.
  • Generation Speed: By significantly reducing the number of required forward passes compared to previous patch-based methods (e.g., 9 passes versus 81 for a 1k image), it offers a substantial speedup over other training-free baselines.

Conclusion and Future Work

ElasticDiffusion provides a robust solution for generating arbitrary-sized images without the need for expensive retraining or fine-tuning. By separating global and local content, it maintains structural coherence while preserving fine detail. While the method inherits some base model weaknesses, such as prompt alignment issues, it represents a significant advancement in flexible, efficient image generation. Future research may focus on refining the balance between sharpness and coherence or applying these principles to other generative architectures.

Summary updated

BibTeX
@inproceedings{hajiali2024elasticdiffusion,
  author = {Moayed Haji-Ali and Guha Balakrishnan and Vicente Ordonez},
  title = {{ElasticDiffusion: Training-Free Arbitrary Size Image Generation Through Global-Local Content Separation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
  doi = {10.1109/cvpr52733.2024.00631},
}
Figure