VMix: Improving Text-to-Image Diffusion Model with Cross-Attention Mixing Control

Shaojin Wu, Fei Ding, Mengqi Huang, Wei Liu, Qian HearXiv 2024 · OpenReview

Abstract

While diffusion models show extraordinary talents in text-to-image generation, they may still fail to generate highly aesthetic images. More specifically, there is still a gap between the generated images and the real-world aesthetic images in finer-grained dimensions including color, lighting, composition, etc. In this paper, we propose Cross-Attention Value Mixing Control (VMix) Adapter, a plug-and-play aesthetics adapter, to upgrade the quality of generated images while maintaining generality across visual concepts by (1) disentangling the input text prompt into the content description and aesthetic description by the initialization of aesthetic embedding, and (2) integrating aesthetic conditions into the denoising process through value-mixed cross-attention, with the network connected by zero-initialized linear layers. Our key insight is to enhance the aesthetic presentation of existing diffusion models by designing a superior condition control method, all while preserving the image-text alignment. Through our meticulous design, VMix is flexible enough to be applied to community models for better visual performance without retraining. To validate the effectiveness of our method, we conducted extensive experiments, showing that VMix outperforms other state-of-the-art methods and is compatible with other community modules (e.g., LoRA, ControlNet, and IPAdapter) for image generation.

Introduction

State-of-the-art text-to-image (T2I) diffusion models like Stable Diffusion (SD) and SDXL have demonstrated impressive generative capabilities. However, a persistent "aesthetic gap" remains between AI-generated images and professional, real-world photography. Common artifacts include unnatural lighting, suboptimal color palettes, and compositional distortions.

Figure 1: Comparison of VMix with SDXL and SDXL-DPO, highlighting the trade-off between text fidelity and visual aesthetics.

A primary challenge in closing this gap is that aesthetic qualities are often difficult to articulate through standard text prompts. Furthermore, existing fine-tuning methods often suffer from a trade-off: as visual aesthetics improve, text fidelity—the model's adherence to specific prompt details—frequently degrades. VMix addresses this by disentangling aesthetic control from content generation, allowing for high-quality visual refinement without altering the intended image layout.

Methodology

The VMix architecture introduces a modular adapter framework that integrates into the diffusion pipeline via two main components: Aesthetic Embedding Initialization and Value-Mixed Cross-Attention.

Figure 2: The VMix framework overview, illustrating the initialization, training, and inference stages.

Aesthetic Embedding Initialization (AesEmb)

Rather than relying on vague user-provided aesthetic keywords, VMix utilizes a predefined set of fine-grained aesthetic dimensions (e.g., "vibrant color," "natural light"). Using a frozen CLIP model, the system generates embeddings for these labels. By employing "opposing labels" (superior vs. inferior), the model learns a directional vector for aesthetic enhancement, effectively disentangling "what" to draw from "how" it should appear.

Value-Mixed Cross-Attention

The core technical innovation is the Value-Mixed Cross-Attention mechanism. In a standard transformer block, cross-attention is computed using Queries ($Q$), Keys ($K$), and Values ($V$). VMix introduces a secondary aesthetic branch alongside the content branch. To preserve spatial layout and prevent "compositional drift," both branches share the same attention map ($QK^T$) derived from the content branch. The aesthetic features are then integrated by mixing the "Values" ($V$) from both branches. This ensures that aesthetic refinements (like lighting and texture) are applied to the correct pixels without shifting objects within the frame. The system is connected via zero-initialized linear layers to ensure training stability.

Experiments and Results

Datasets and Benchmarks

The model was trained on a curated subset of 200,000 high-quality images from the LAION dataset. Evaluation was conducted on MJHQ-30K and a newly introduced benchmark, LAION-HQ10K, which consists of 10,000 high-resolution real-world images designed to measure the gap between synthetic generation and professional photography.

Quantitative Performance

On the MJHQ-30K benchmark, VMix achieved a Frechet Inception Distance (FID) of 21.49, a significant improvement over the baseline SD's 28.08. It also attained the highest Aesthetic Score (5.79) compared to other alignment methods like Direct Preference Optimization (DPO) and Supervised Fine-Tuning (SFT).

Qualitative Analysis and Compatibility

Visual results demonstrate that VMix significantly enhances skin textures, lighting realism, and color harmony. User studies confirm a strong preference for VMix-enhanced images in terms of both visual appeal and text fidelity. Notably, as a plug-and-play adapter, VMix maintains compatibility with community modules such as ControlNet and IP-Adapter without requiring retraining.

Conclusion

VMix successfully bridges the aesthetic gap in diffusion models by separating content and aesthetic control through value-mixed cross-attention. While the current implementation relies on a closed set of aesthetic labels and can occasionally exhibit object-specific biases, it represents a significant step toward high-fidelity, aesthetically superior AI image generation. Future work will focus on expanding the aesthetic label set and mitigating these biases.

Summary updated

BibTeX
@misc{wu2024vmix,
  author = {Shaojin Wu and Fei Ding and Mengqi Huang and Wei Liu and Qian He},
  title = {{VMix: Improving Text-to-Image Diffusion Model with Cross-Attention Mixing Control}},
  year = {2024},
  eprint = {2412.20800},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.20800},
}
Figure