EMMA: Your Text-to-Image Diffusion Model Can Secretly Accept Multi-Modal Prompts

Yucheng Han, Rui Wang, Chi Zhang, Juntao Hu, Pei Chen, Bin Fu, Hanwang Zhang

TL;DR

EMMA is a novel diffusion model that allows existing text-to-image models to seamlessly incorporate additional modalities (like images of faces or styles) without requiring retraining. This is achieved through a clever "Multi-modal Feature Connector" that injects these new conditions into the model's intermediate layers, enabling more flexible and personalized image generation.

What Problem Does This Paper Address?

Current state-of-the-art text-to-image diffusion models are incredibly powerful, generating high-quality images from textual descriptions. However, they often struggle when presented with multiple types of input conditions simultaneously. For instance, if you want to generate an image based on a text description and a specific person's face, or a particular artistic style, existing methods tend to favor one condition over the others, leading to a loss of control or fidelity. This paper addresses the challenge of creating a unified framework that can effectively balance and integrate diverse multi-modal conditions for image generation, without the need for extensive retraining for each new combination.

Methods

The core innovation of EMMA lies in its Multi-modal Feature Connector. This connector is built upon the architecture of ELLA, a text-to-image diffusion model that uses a "Perceiver Resampler" to integrate text embeddings. EMMA extends this by introducing an Assemblable Gated Perceiver Resampler (AGPR).

Here's how it works:

  • Leveraging Existing Models: EMMA builds upon pre-trained text-to-image diffusion models (like Stable Diffusion) and keeps their core components (like the U-Net) frozen. This means it doesn't need to retrain the entire diffusion model.
  • Injecting Modalities: The AGPR module is strategically interleaved with the Perceiver Resampler. It uses cross-attention mechanisms to inject information from additional modalities (e.g., facial features, style images) into the model's intermediate layers.
  • Gated Control: The "Gated" aspect of AGPR is crucial. It uses learnable gates to control how much influence each modality has, allowing for fine-grained control over the integration process. This prevents one modality from overpowering others.
  • Modular Assembly: A key advantage is that EMMA's components are modular. This means you can combine different AGPR modules trained on various conditions (e.g., one for faces, one for styles) to create new models for complex multi-modal generation without needing to train from scratch.

Datasets

The paper mentions the use of:

  • Common Object Dataset: Collected from LAION and COYO, filtered for aesthetic quality and resolution. Random masks were used for guidance.
  • Portrait Dataset: An internal dataset of 400K images with 100K unique human IDs, fine-tuned for 200K iterations.
  • ActivityNet Validation Set: Used for constructing human action prompts for portrait generation.
  • Unsplash Website: Used for portrait and prompt data.

Key Insights and Ideas

  • "Secret" Multi-modal Capability: A surprising finding is that pre-trained text-to-image diffusion models, when augmented with EMMA's connector, can "secretly" accept multi-modal prompts without needing their original parameters to be modified. This highlights the inherent flexibility of these models.
  • Modularity is Key: The ability to assemble different EMMA modules (trained on specific conditions) without further training is a significant breakthrough. This drastically reduces the computational cost and complexity of creating models for novel multi-modal tasks.
  • Gated Control for Balance: The introduction of gates within the AGPR module is essential for balancing the influence of different modalities. This allows for precise control over how text, face features, and style information are combined.
  • Token-Level Attention: Visualizations show that different conditions lead to distinct patterns of attention across tokens in the model's layers. This suggests that specific tokens are more sensitive to certain modalities, forming the basis for effective module composition.

Key Results

  • High Fidelity and Detail: EMMA consistently generates images with high fidelity and detail, maintaining strong text control even when incorporating other modalities.
  • State-of-the-Art Performance: In quantitative evaluations for portrait generation, EMMA achieved the highest scores (CLIP-T and DINO) compared to existing methods like IP-Adapter and BLIP-Diffusion.
  • Effective Style Conditioning: EMMA with separated gates demonstrated better performance in style-conditioned generation compared to models without them, indicating the benefit of finer control over token embeddings.
  • Versatile Applications: The paper showcases EMMA's ability to generate personalized portraits, cartoon-style images, and even subject-driven video generation by seamlessly integrating with existing diffusion frameworks.

Limitations and Future Work

  • English Prompts Only: The current version of EMMA is limited to processing English prompts.
  • Multilingual Support: The authors plan to implement multilingual prompt support in future work.
  • Further Algorithm Implementation: They also aim to implement the same algorithm in diffusion models that support multilingual prompts.

Summary updated

BibTeX
@inproceedings{han2024emma,
  author = {Yucheng Han and Rui Wang and Chi Zhang and Juntao Hu and Pei Chen and Bin Fu and Hanwang Zhang},
  title = {{EMMA: Your Text-to-Image Diffusion Model Can Secretly Accept Multi-Modal Prompts}},
  booktitle = {IJCNN},
  year = {2024},
}
Figure