Training-free Diffusion Model Adaptation for Variable-Sized Text-to-Image Synthesis

Zhiyu Jin, Xuli Shen, Bin Li, Xiangyang Xue
6/14/2023
cs.CVcs.LGeess.IV

No official code found. Best implementation: trungdt880/training-free-diffusion-variable-sized (16 stars, last commit 2023-09-27).

Abstract

Diffusion models (DMs) have recently gained attention with state-of-the-art performance in text-to-image synthesis. Abiding by the tradition in deep learning, DMs are trained and evaluated on the images with fixed sizes. However, users are demanding for various images with specific sizes and various aspect ratio. This paper focuses on adapting text-to-image diffusion models to handle such variety while maintaining visual fidelity. First we observe that, during the synthesis, lower resolution images suffer from incomplete object portrayal, while higher resolution images exhibit repetitively disordered presentation. Next, we establish a statistical relationship indicating that attention entropy changes with token quantity, suggesting that models aggregate spatial information in proportion to image resolution. The subsequent interpretation on our observations is that objects are incompletely depicted due to limited spatial information for low resolutions, while repetitively disorganized presentation arises from redundant spatial information for high resolutions. From this perspective, we propose a scaling factor to alleviate the change of attention entropy and mitigate the defective pattern observed. Extensive experimental results validate the efficacy of the proposed scaling factor, enabling models to achieve better visual effects, image quality, and text alignment. Notably, these improvements are achieved without additional training or fine-tuning techniques.

View on arXivView PDF

Code Implementations(1)

Unofficial Implementation of Training-free Diffusion Model Adaptation for Variable-Sized Text-to-Image Synthesis

160PythonSep 27, 20233 years ago
diffusersdiffusiondiffusion-modelsstable-diffusiontraining-free

Similar Papers

Cite this paper

@article{jin2023trainingfree,
  title  = {Training-free Diffusion Model Adaptation for Variable-Sized Text-to-Image Synthesis},
  author = {Zhiyu Jin and Xuli Shen and Bin Li and Xiangyang Xue},
  year   = {2023},
  eprint = {2306.08645},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2306.08645v2},
  journal = {NEURIPS 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2306.08645.svg)](https://codeofpaper.com/paper/2306.08645)

Discussion