FreeCus: Free Lunch Subject-driven Customization in Diffusion Transformers

Yanbing Zhang, Zhe Wang, Qin Zhou, Mengping Yang

TL;DR

This paper introduces FreeCus, a novel framework that enables subject-driven customization in diffusion transformers (DiTs) without requiring any additional training. By cleverly adapting attention mechanisms and integrating multimodal LLMs, FreeCus achieves high-fidelity subject synthesis across diverse contexts, rivaling methods that necessitate extensive training.

What Problem Does This Paper Address?

Recent advancements in text-to-image (T2I) generation, particularly with diffusion transformers (DiTs), have opened up exciting possibilities for subject-driven customization. This allows users to generate images featuring a specific subject (like a person or object) while maintaining its identity across various scenes and styles. However, existing methods for this task fall into two main categories, both with significant drawbacks:

  1. Per-subject optimization: These methods fine-tune models using a small number of subject-specific images. While effective, this requires laborious retraining for each new subject, making it impractical for many applications.
  2. Training specialized encoders: These approaches train encoders on large datasets to extract subject features. While enabling training-free generalization, they demand substantial computational resources and extensive data collection for encoder training.

Crucially, neither of these approaches fully leverages the inherent zero-shot capabilities of modern DiTs. This gap leaves a need for a method that can achieve subject-driven customization without any training, offering true zero-shot personalization.

Methods

FreeCus tackles this challenge by enhancing pre-trained DiTs through three key innovations:

  1. Pivotal Attention Sharing (PAS): Instead of sharing attention across all layers, FreeCus strategically shares attention only in ten "vital" layers of the DiT. These layers are crucial for encoding essential content features, helping to maintain the subject's layout integrity. To further refine this, a subject mask is used to focus attention on the subject itself, minimizing interference from background elements. The method also introduces parameters ($\lambda_r$ and $\lambda_p$) to control the relative influence of the reference image and the text prompt.
  2. Adjustment of Noise Shifting (ANS): To compensate for potential detail loss introduced by restricted attention sharing, FreeCus analyzes and adjusts the dynamic shifting mechanism within the DiT. By reversing the noise shifting direction for the reference image, the model is encouraged to focus on less noisy, subject-specific content, leading to better detail transfer.
  3. Semantic Features Compensation (SFC) with Multimodal LLMs: To address potential deficiencies in semantic features (like color) that might be missed during attention sharing, FreeCus leverages advanced Multimodal Large Language Models (MLLMs). This involves using a large vision-language model (LVLM) to generate a concise, subject-specific caption from the reference image, followed by a large language model (LLM) to filter out irrelevant details. This refined caption is then combined with the original prompt to ensure a more comprehensive subject representation.

Datasets

The paper primarily uses existing datasets for training and evaluation. The specific datasets are not explicitly listed for training the base models, but the evaluation is performed using the DreamBench++ benchmark, which is noted as being five times larger than the commonly used DreamBench.

Key Insights and Ideas

  • The power of "vital" layers: Restricting attention sharing to specific, critical layers in DiTs is surprisingly effective for preserving subject identity while maintaining editability. This suggests a more nuanced understanding of how information flows within these models.
  • Reversing noise for detail: The counter-intuitive idea of reversing the noise shifting direction for the reference image to extract finer details is a clever way to enhance subject fidelity. It highlights that the "optimal" noise level for feature extraction can depend on the task.
  • LLMs as semantic補丁 (patches): Using MLLMs to generate and refine subject captions acts as a powerful "patch" for semantic information that might be lost in the visual feature extraction process, demonstrating the growing synergy between vision and language models.
  • True zero-shot is achievable: The paper strongly advocates for and demonstrates that achieving subject-driven customization without any fine-tuning or specialized encoder training is indeed possible with modern DiTs.

Key Results

FreeCus achieves state-of-the-art or comparable results to methods that require additional training.

  • Quantitative: In comparisons against various optimization-based and optimization-free methods, FreeCus demonstrates high subject similarity (CLIP-I and DINO scores) while maintaining good text controllability (CLIP-T scores). Ablation studies show that removing any of the three core components (PAS, ANS, SFC) significantly degrades performance.
  • Qualitative: The method successfully generates consistent subjects across diverse contexts, including artistic variations, action changes, and object additions. Figure 6 showcases impressive results where FreeCus maintains subject fidelity and prompt adherence, outperforming other methods that struggle with subject consistency, text alignment, or generate artifacts. The paper also demonstrates its compatibility with other DiT-based methods and its seamless integration into inpainting pipelines.

Limitations and Future Work

The authors acknowledge two primary limitations:

  • Attention sharing artifacts: The attention sharing mechanism can sometimes introduce artifacts around the outlines of the subject. While attempts were made to mitigate this, it led to a reduction in subject similarity, highlighting an ongoing challenge in flexible reference feature mapping.
  • MLLM caption accuracy: Subject captions generated by MLLMs are not always perfectly accurate. The authors anticipate that rapid advancements in multimodal language modeling will address this limitation in the future.

Future work could focus on developing more robust methods for reference feature mapping to eliminate artifacts and exploring even more advanced MLLMs for improved caption generation. The paper also suggests that the approach can be extended to control structural properties using depth-guided diffusion models.

Summary updated

BibTeX
@inproceedings{zhang2025freecus,
  author = {Yanbing Zhang and Zhe Wang and Qin Zhou and Mengping Yang},
  title = {{FreeCus: Free Lunch Subject-driven Customization in Diffusion Transformers}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
}
Figure