Introduction
Stable Diffusion (SD) has fundamentally changed text-to-image generation, yet it remains constrained by two primary "size-related" challenges. First, compositional issues arise when generating non-square images; because SD is trained primarily on fixed-size square data, it often produces "double-headed" subjects or repetitive patterns in wide or tall aspect ratios. Second, memory constraints limit the generation of high-definition (HD) or 4K images on consumer hardware. Existing "tiled diffusion" solutions often introduce visible seams or incur significant computational overhead due to heavy pixel overlap. Any-Size-Diffusion (ASD) addresses these by introducing a two-stage pipeline that ensures structural integrity and memory efficiency.
Methods
The ASD framework consists of two distinct stages designed to handle composition and resolution respectively.
Stage I: Any Ratio Adaptability Diffusion (ARAD)
To overcome compositional biases, the authors employ a multi-aspect ratio training strategy. By finetuning the model on a diverse set of predefined ratios, the model learns to arrange subjects correctly across various rectangular canvases, preventing the common "duplicate subject" error seen in standard models.
Stage II: Fast Seamless Tiled Diffusion (FSTD)
For HD scaling, ASD introduces Implicit Overlap. Unlike traditional methods that use computationally expensive "explicit overlap" (processing shared pixels multiple times), FSTD uses non-overlapping tiles. It achieves seamlessness by applying a random offset to the tile grid at each denoising step. This ensures global consistency through cross-tile communication over the course of the diffusion process without the 2x–4x speed penalty of standard tiling.
Key Results
ASD demonstrates significant improvements in both efficiency and image quality across various benchmarks.
- Resolution and Memory: ASD achieves at least 9x higher resolution than the original SD model under identical hardware conditions, fitting 4K generation into 32GB GPU memory.
- Quantitative Quality: On the MM-CelebA-HQ benchmark, ASD improved the Fréchet Inception Distance (FID) score significantly (from 118.83 in baseline SR-Plus to 85.34), indicating superior realism.
- Inference Speed: FSTD reduced inference time by approximately 50% compared to "explicit overlap" tiling methods (e.g., 75 seconds vs 166 seconds for a specific HD task).
Qualitative Composition
As shown in the comparison below, standard SD 2.1 and Multi-Diffusion (MD) models frequently suffer from "composition collapse," resulting in multiple heads or distorted bodies when generating non-square images. ASD maintains a single, coherent subject regardless of the aspect ratio.
Conclusion and Future Work
Any-Size-Diffusion provides a robust solution for generating high-quality, well-composed images of any size. By rethinking composition as a training bias and seamlessness as a temporal denoising property, the authors achieve 4K synthesis that is both faster and more structurally sound than previous state-of-the-art methods. While 4K generation still takes over a minute, the authors suggest that this "implicit overlap" logic could potentially be applied to video generation to ensure temporal and spatial consistency across frames more efficiently.
Summary updated