MM-Diff: High-Fidelity Image Personalization via Multi-Modal Condition Integration

Zhichao Wei, Qingkun Su, Long Qin, Weizhi WangarXiv 2024

Abstract

Recent advances in tuning-free personalized image generation based on diffusion models are impressive. However, to improve subject fidelity, existing methods either retrain the diffusion model or infuse it with dense visual embeddings, both of which suffer from poor generalization and efficiency. Also, these methods falter in multi-subject image generation due to the unconstrained cross-attention mechanism. In this paper, we propose MM-Diff, a unified and tuning-free image personalization framework capable of generating high-fidelity images of both single and multiple subjects in seconds. Specifically, to simultaneously enhance text consistency and subject fidelity, MM-Diff employs a vision encoder to transform the input image into CLS and patch embeddings. CLS embeddings are used on the one hand to augment the text embeddings, and on the other hand together with patch embeddings to derive a small number of detail-rich subject embeddings, both of which are efficiently integrated into the diffusion model through the well-designed multimodal cross-attention mechanism. Additionally, MM-Diff introduces cross-attention map constraints during the training phase, ensuring flexible multi-subject image sampling during inference without any predefined inputs (e.g., layout). Extensive experiments demonstrate the superior performance of MM-Diff over other leading methods.

Introduction

Personalized image generation—the ability to place a specific person or object into a new scene—has traditionally faced a trade-off between speed and quality. Fine-tuning methods like DreamBooth offer high fidelity but require 10–30 minutes of training per subject. Conversely, existing tuning-free methods provide instant results but often struggle with fine details or "attribute binding" issues when generating multiple subjects, where features from one subject bleed into another.

MM-Diff is a novel tuning-free framework designed to bridge this gap. It enables high-fidelity personalization for both single and multiple subjects in seconds, avoiding the computational overhead of per-subject optimization while maintaining superior visual accuracy.

Methodology

MM-Diff introduces several architectural innovations to the Stable Diffusion XL (SDXL) pipeline to enhance integration of visual and textual cues:

  • Subject Embedding Refiner (SE-Refiner): Rather than using hundreds of raw patch embeddings, MM-Diff employs a transformer-based refiner to distill visual information into a compact set of eight detail-rich subject embeddings. This ensures efficiency without sacrificing the nuances of the subject's appearance.
  • Vision-Augmented Text Embeddings: Global CLIP features of the subject are fused with text tokens before reaching the text encoder, providing the model with a strong initial visual context.
  • Multi-Modal Cross-Attention with LoRA: To integrate these visual cues seamlessly, the framework utilizes Low-Rank Adaptation (LoRA) on the cross-attention layers, preserving the base model's generative capabilities while specializing it for personalization.
  • Cross-Attention Map Constraints: To solve the multi-subject "bleeding" problem, MM-Diff applies an L1 loss constraint during training. This forces the attention maps for specific subject tokens to align with their respective segmentation masks, ensuring spatial discipline during inference.
High-fidelity personalization: placing a specific subject into a novel context (astronaut suit).

Experimental Setup

The model was trained on a structured subset of ImageNet-1k (280k images) and FFHQ-wild (70k images). Evaluation was conducted using the DreamBench and Celeb-A datasets, comparing MM-Diff against state-of-the-art methods including DreamBooth, IP-Adapter, and PhotoMaker.

Results and Discussion

MM-Diff demonstrates significant improvements in both fidelity and efficiency:

  • Fidelity: On DreamBench, MM-Diff achieved a DINO score of 80.8%, outperforming IP-Adapter (70.9%). In portrait similarity, it reached 75.6%, surpassing PhotoMaker (49.3%).
  • Efficiency: While DreamBooth requires over 500 seconds for fine-tuning, MM-Diff generates personalized images in approximately 4 seconds.
  • Multi-Subject Generation: The model successfully maintains subject identity in complex scenes. Quantitative tests showed a Face Similarity of 65.5% for multi-subject tasks, a substantial lead over FastComposer (54.0%).
Multi-subject generation using MM-Diff, showing distinct features for both individuals without attribute mixing.

The "spatial discipline" learned through attention map constraints allows the model to keep subjects distinct without requiring manual layouts or bounding boxes from the user.

Conclusion

MM-Diff provides a robust solution for instant, high-fidelity image personalization. While currently limited by the scale and diversity of its training data (e.g., predominantly single-subject training images), the framework establishes a powerful foundation for multi-modal diffusion. Future work will focus on scaling to larger, more heterogeneous datasets to further enhance the model's generative versatility.

Summary updated

BibTeX
@misc{wei2024mm,
  author = {Zhichao Wei and Qingkun Su and Long Qin and Weizhi Wang},
  title = {{MM-Diff: High-Fidelity Image Personalization via Multi-Modal Condition Integration}},
  year = {2024},
  eprint = {2403.15059},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.15059},
}
Figure