Initno: Boosting Text-to-Image Diffusion Models via Initial Noise Optimization

Xiefan Guo, Jinlin Liu, Miaomiao Cui, Jiankai Li, Hongyu Yang, Di Huang

Abstract: Text-to-image diffusion models often struggle with complex prompts, leading to issues like subject neglect, subject mixing, and incorrect attribute binding. These failures are frequently tied to the "luck of the draw" in initial random noise. This paper introduces Initial Noise Optimization (InitNO), a training-free framework that identifies and steers initial noise toward "valid" regions of the latent space. By optimizing the starting noise distribution using cross-attention and self-attention metrics, InitNO significantly improves prompt adherence and image quality without the distortion common in step-by-step guidance methods.

The Challenge of Prompt Adherence

While models like Stable Diffusion have revolutionized image generation, they remain sensitive to initial conditions. A prompt for "a cat and a dog" might result in only a cat (subject neglect) or a strange hybrid (subject mixing). Research indicates that the initial random noise—the "seed"—largely determines whether a generation succeeds or fails.

Comparison of common diffusion failure modes in Stable Diffusion versus the improved results from InitNO.

Previous attempts to solve this typically involve "nudging" the image at every step of the diffusion process. However, this constant intervention often leads to a "tug-of-war" between the prompt and the model’s learned distribution, resulting in over-saturated or distorted images.

Methodology: Initial Noise Optimization (InitNO)

Instead of correcting the image during the generation process, InitNO focuses on the starting point. The framework identifies "valid" noise regions—those that naturally lead the model to attend to all parts of the prompt—and optimizes the initial noise to fall within these regions.

The optimization is guided by two primary metrics:

  1. Cross-attention response score: This measures whether the model is paying sufficient attention to every subject in the text. For instance, if the attention score for a word like "crown" is too low, the resulting image will likely omit it.
  2. Self-attention conflict score: This measures the overlap between different subjects. High overlap often causes "subject mixing," where features of one object bleed into another.
An example of successful subject and attribute generation (an elephant with a crown) achieved through noise optimization.

When initial noise is deemed "invalid," InitNO uses a joint loss function to optimize the mean ($\mu$) and standard deviation ($\sigma$) of the noise distribution. To ensure the optimized noise remains recognizable to the model and avoids artifacts, a KL divergence loss is employed to maintain alignment with a standard Gaussian distribution.

Key Insights and Results

InitNO represents a "middle path" in controllable generation. By focusing on the initial noise rather than per-step guidance, it avoids the common pitfall of image distortion. Furthermore, the authors identify self-attention—rather than just cross-attention—as the primary driver of subject mixing, allowing for more effective decoupling of distinct objects.

In quantitative evaluations, InitNO outperformed state-of-the-art methods like Attend-and-Excite and A-STAR across CLIP similarity metrics. Qualitative results demonstrate significantly cleaner attribute binding, such as ensuring a "red backpack" and a "black suitcase" maintain their intended colors. In user preference studies, InitNO was preferred 63.33% of the time, highlighting its practical effectiveness.

Conclusion and Future Work

InitNO offers a plug-and-play solution that improves the reliability of diffusion models without requiring retraining. While the optimization loop increases inference time (approximately 2x), it remains more efficient than manual seed searching. Future work may involve integrating InitNO with other controllable tasks, such as layout-to-image synthesis, to provide even more granular control over generative AI outputs.

Summary updated

BibTeX
@inproceedings{guo2024initno,
  author = {Xiefan Guo and Jinlin Liu and Miaomiao Cui and Jiankai Li and Hongyu Yang and Di Huang},
  title = {{Initno: Boosting Text-to-Image Diffusion Models via Initial Noise Optimization}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
}
Figure