Skip to main content
QUICK REVIEW

[Paper Review] Training-free Diffusion Model Adaptation for Variable-Sized Text-to-Image Synthesis

Zhiyu Jin, Xuli Shen|arXiv (Cornell University)|Jun 14, 2023
Generative Adversarial Networks and Image SynthesisComputer Science6 citations
TL;DR

This paper proposes a training-free method to adapt text-to-image diffusion models for variable-sized image synthesis by introducing a novel scaling factor that stabilizes attention entropy across different resolutions. By analyzing the relationship between token count and attention entropy, the method mitigates incomplete object representation at low resolutions and repetitive, disordered patterns at high resolutions, significantly improving image quality and text alignment without retraining.

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.

Motivation & Objective

  • Address the challenge of generating high-fidelity images at diverse resolutions and aspect ratios using pre-trained diffusion models.
  • Overcome the limitations of fixed-size training by enabling effective synthesis across low and high resolutions.
  • Mitigate two distinct failure patterns: incomplete object portrayal in low-resolution images and repetitive, disordered object generation in high-resolution images.
  • Improve semantic alignment between text prompts and generated images across variable resolutions.
  • Achieve these improvements without additional training or fine-tuning, ensuring compatibility with existing open-source models.

Proposed method

  • Propose a scaling factor for attention layers that modulates the spatial aggregation of features based on resolution.
  • Establish a statistical relationship between the number of tokens (resolution-dependent) and the entropy of attention maps.
  • Interpret low-resolution defects as insufficient spatial information due to narrow attention, and high-resolution defects as redundant spatial aggregation from overly wide attention.
  • Design the scaling factor to stabilize attention entropy across varying sequence lengths (token counts), reducing resolution-induced distribution shifts.
  • Apply the scaling factor during inference only, replacing the original scaling in attention mechanisms without model retraining.
  • Validate the method through qualitative and quantitative analysis on diverse resolutions and aspect ratios, including 224², 512², and 768².

Experimental results

Research questions

  • RQ1How does attention entropy vary with image resolution in diffusion models, and what does this imply for visual quality across resolutions?
  • RQ2Why do low-resolution images suffer from incomplete object representation while high-resolution images exhibit repetitive, disordered patterns?
  • RQ3Can a resolution-agnostic scaling factor stabilize attention entropy and improve visual fidelity across variable-sized synthesis?
  • RQ4How does the proposed method compare to up-sampling and super-resolution techniques in terms of semantic richness and visual coherence?
  • RQ5To what extent can this training-free approach improve image quality and text alignment without fine-tuning?

Key findings

  • The proposed scaling factor successfully reduces attention entropy fluctuations across resolutions, stabilizing the model’s spatial aggregation behavior.
  • At 224² resolution, the method increases attention entropy, improving object completeness and reducing underrepresentation.
  • At 768² resolution, the method decreases attention entropy, mitigating repetitive and disordered object generation.
  • The method achieves superior image quality and text alignment scores across all tested resolutions, including 224², 512², and 768².
  • Qualitative results show richer semantic content and more natural image structures compared to up-sampling and super-resolution baselines.
  • The method maintains low time and memory costs at low resolutions, enabling efficient inference on resource-constrained devices.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.