eDiff-I: Text-to-Image Diffusion Models with an Ensemble of Expert Denoisers

Yogesh Balaji, Seungjun Nah, Xun Huang, Arash Vahdat, Jiaming Song, Qinsheng Zhang, Karsten Kreis, Miika Aittala, Timo Aila, Samuli Laine, Bryan Catanzaro, Tero Karras, Ming-Yu LiuOpenReview 2022

Abstract

Large-scale diffusion-based generative models have led to breakthroughs in text-conditioned high-resolution image synthesis. Starting from random noise, such text-to-image diffusion models gradually synthesize images in an iterative fashion while conditioning on text prompts. We find that their synthesis behavior qualitatively changes throughout this process: Early in sampling, generation strongly relies on the text prompt to generate text-aligned content, while later, the text conditioning is almost entirely ignored. This suggests that sharing model parameters throughout the entire generation process may not be ideal. Therefore, in contrast to existing works, we propose to train an ensemble of text-to-image diffusion models specialized for different synthesis stages. To maintain training efficiency, we initially train a single model, which is then split into specialized models that are trained for the specific stages of the iterative generation process. Our ensemble of diffusion models, called eDiff-I, results in improved text alignment while maintaining the same inference computation cost and preserving high visual quality, outperforming previous large-scale text-to-image diffusion models on the standard benchmark. In addition, we train our model to exploit a variety of embeddings for conditioning, including the T5 text, CLIP text, and CLIP image embeddings. We show that these different embeddings lead to different behaviors. Notably, the CLIP image embedding allows an intuitive way of transferring the style of a reference image to the target text-to-image output. Lastly, we show a technique that enables eDiff-I's "paint-with-words" capability. A user can select the word in the input text and paint it in a canvas to control the output, which is very handy for crafting the desired image in mind.

Introduction

Standard text-to-image diffusion models typically employ a single neural network to perform denoising across the entire generation timeline, from initial Gaussian noise to the final high-resolution image. However, empirical analysis of the synthesis process reveals a significant temporal shift in model behavior. Early stages are primarily concerned with establishing global content and layout based on the text prompt, whereas later stages focus on refining visual fidelity and fine-grained textures, often ignoring the text conditioning entirely. eDiff-I addresses this by introducing an Ensemble of Expert Denoisers, where specialized models are trained for specific temporal regimes, optimizing both content alignment and visual quality.

Methodology

Ensemble of Expert Denoisers

To implement a temporal division of labor efficiently, eDiff-I utilizes a binary tree branching strategy. Training begins with a monolithic base model, which is subsequently split into specialized experts for high-noise (early stage) and low-noise (late stage) regimes. These experts undergo further fine-tuning to specialize in their respective tasks. Because only one expert is active at any given timestep during inference, the ensemble increases model capacity without increasing the computational cost of generating an image.

Multi-modal Conditioning and Style Transfer

eDiff-I leverages a trio of embeddings to guide the generation process:

  • T5-XXL: Provides deep semantic understanding, preventing "attribute bleeding" and ensuring complex logical prompts are followed accurately.
  • CLIP Text: Captures the global aesthetic and stylistic "vibe" of the prompt.
  • CLIP Image: Enables a unique style transfer capability. By conditioning the model on a reference image's CLIP embedding, users can guide the aesthetic of the generated output while maintaining the content specified in the text prompt.
Style transfer using CLIP image embeddings: a duckling generated in the style of a metal sculpture reference.

Paint-with-Words

To provide users with direct compositional control, eDiff-I introduces "paint-with-words." This training-free extension modifies cross-attention layers, allowing users to select specific words from a prompt and paint them onto a spatial canvas. The model then boosts attention for those words in the designated areas, ensuring the generated objects appear exactly where intended.

The 'paint-with-words' feature allows users to control composition by painting semantic masks on a canvas to guide the final output.

Results and Discussion

eDiff-I achieves state-of-the-art performance, recording a zero-shot FID score of 6.95 on the MS-COCO 2014 benchmark, surpassing models like Parti (7.23) and Imagen (7.27). Qualitative results show that eDiff-I is significantly better at rendering legible text within images and adhering to long, multi-object descriptions that often cause other models to omit details.

While the branching training strategy requires more total GPU hours than single-denoiser training, the resulting model offers significantly higher capacity without increasing inference latency. Future work may explore applying this ensemble logic to other domains, such as video generation, where temporal dynamics are even more critical.

Summary updated

BibTeX
@misc{balaji2022ediff,
  author = {Yogesh Balaji and Seungjun Nah and Xun Huang and Arash Vahdat and Jiaming Song and Qinsheng Zhang and Karsten Kreis and Miika Aittala and Timo Aila and Samuli Laine and Bryan Catanzaro and Tero Karras and Ming-Yu Liu},
  title = {{eDiff-I: Text-to-Image Diffusion Models with an Ensemble of Expert Denoisers}},
  year = {2022},
  eprint = {2211.01324},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.01324},
  howpublished = {OpenReview},
}
Figure