DEADiff: An Efficient Stylization Diffusion Model with Disentangled Representations

Tianhao Qi, Shancheng Fang, Yanze Wu, Hongtao Xie, Jiawei Liu, Lang Chen, Qian He, Yongdong Zhang

Introduction

In the rapidly evolving field of AI-generated art, "stylization"—the ability to apply the aesthetic characteristics of a reference image to new content—remains a significant challenge. While text-to-image diffusion models like Stable Diffusion have revolutionized content creation, existing methods for style transfer often force a compromise between three critical factors: generation speed, stylistic fidelity, and text controllability.

Optimization-based methods, such as StyleDrop, achieve high fidelity but require lengthy fine-tuning for every new style. Conversely, encoder-based methods like T2I-Adapter offer near-instantaneous results but frequently suffer from "semantic conflict." This occurs when the model fails to decouple the style of a reference image from its content, leading to outputs that ignore the user's text prompt in favor of the reference image's subjects. DEADiff introduces a novel framework designed to bridge this gap, providing the speed of encoder-based architectures with the precision and controllability typically reserved for optimization-heavy approaches.

Methodology: Disentangling Style and Content

The core innovation of DEADiff lies in its ability to "disentangle" representations. The authors identify that the primary failure mode of existing adapters is the "coupling" of style and content within the latent space. To address this, DEADiff employs three distinct strategies:

1. Dual Decoupling Representation Extraction (DDRE)

Rather than relying on a single, monolithic encoder, DEADiff utilizes a dual-encoder system powered by two Q-Formers. These lightweight transformer architectures are tasked with extracting distinct features from the same reference image. By providing text-based instructions (e.g., "style" vs. "content") to the Q-Formers, the model leverages the pre-trained vision-language knowledge of CLIP to perform "feature surgery," isolating aesthetic elements from semantic ones.

2. Disentangled Conditioning Mechanism (DCM)

The researchers observed that different layers within a Diffusion U-Net specialize in different levels of image synthesis. Coarse, low-resolution layers generally manage global semantics and layout, while fine, high-resolution layers handle local details, textures, and brushstrokes. DEADiff exploits this architecture by injecting "content" features exclusively into the coarse layers and "style" features into the fine layers. This structural separation creates a physical barrier that prevents stylistic details from overriding the intended subject matter defined by the text prompt.

3. Non-Reconstructive Learning

Traditional adapters are often trained on a reconstruction task: given an image, the model learns to recreate that exact image. This encourages the model to "cheat" by memorizing pixel-level data rather than learning abstract stylistic concepts. DEADiff breaks this loop by training on a massive synthetic paired dataset. During training, the model might be shown a reference image of a house in a specific style and tasked with generating a different subject (e.g., a car) in that same style. This forces the model to generalize the concept of "style" independently of the objects it depicts.

Data and Training Strategy

To support non-reconstructive learning, the authors curated a large-scale dataset of over 1.06 million image-text pairs generated via Midjourney. This includes:

  • Style Pairs (160,000): Images sharing the same style but featuring different subjects.
  • Content Pairs (1,000,000+): Images sharing the same subject but rendered in different styles.

For evaluation, the model was tested against the StyleAdapter benchmark, utilizing 32 diverse style images from WikiArt and Civitai and 35 distinct text prompts.

Key Results and Performance

DEADiff demonstrates a superior balance of performance metrics compared to state-of-the-art (SOTA) methods like IP-Adapter and T2I-Adapter.

  • Quantitative Excellence: In benchmarks for Text Alignment (TA) and Image Quality (IQ), DEADiff consistently outperformed its peers. While some models showed high style similarity, they often did so by sacrificing text controllability (i.e., "copy-pasting" the reference image). DEADiff maintained high fidelity to the style while strictly adhering to the text prompt.
  • User Preference: In a comprehensive user study, DEADiff was preferred 69% of the time, a significant margin over competing methods which all scored below 14%.
  • Efficiency: Despite its dual-encoder system, DEADiff is highly efficient. It adds approximately 1.9GB of VRAM overhead and maintains a negligible impact on inference time, generating images in roughly 2.43 seconds on an NVIDIA A100 (compared to 2.28s for base Stable Diffusion).
  • Versatility: The framework is compatible with other tools like ControlNet for layout control and can even synthesize styles from multiple reference images simultaneously.

Conclusion and Future Work

DEADiff represents a significant step forward in making high-quality, controllable stylization accessible without the need for costly per-style optimization. By combining architectural specialization with a novel training paradigm, it effectively solves the semantic conflict problem inherent in previous encoder-based models.

While highly effective, the authors note that there is still room for improvement in exact color accuracy compared to optimization-based methods. Future research may explore instance-level decoupling—extracting the style of a specific object within a complex scene—and extending the framework to more advanced base models beyond Stable Diffusion v1.5.

Summary updated

BibTeX
@inproceedings{qi2024deadiff,
  author = {Tianhao Qi and Shancheng Fang and Yanze Wu and Hongtao Xie and Jiawei Liu and Lang Chen and Qian He and Yongdong Zhang},
  title = {{DEADiff: An Efficient Stylization Diffusion Model with Disentangled Representations}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
}
Figure