ClassDiffusion: More Aligned Personalization Tuning with Explicit Class Guidance
Jiannan Huang, Jun Hao Liew, Hanshu Yan, Yuyang Yin, Yao Zhao, Humphrey Shi, Yunchao Wei
TL;DR
ClassDiffusion addresses semantic drift and the associated loss of compositionality in personalized diffusion models. It introduces Semantic Preservation Loss (SPL) to constrain the target concept embeddings so they remain close to their superclass in the model's semantic space, yielding the objective $ \mathcal{L} = \mathcal{L}_{recon} + \lambda \mathcal{L}_{sp}$. The approach improves cross-contrast alignment and joint conditional sampling, demonstrated through image and video personalization with quantitative gains on text- and image-based metrics and qualitative demonstrations. A new evaluation metric, BLIP2-T, is proposed to better capture text-image alignment in this domain. Overall, ClassDiffusion offers a simple yet effective way to preserve semantic structure during personalization, enabling more reliable compositional generation and extending to personalized video synthesis.
Abstract
Recent text-to-image customization works have proven successful in generating images of given concepts by fine-tuning diffusion models on a few examples. However, tuning-based methods inherently tend to overfit the concepts, resulting in failure to create the concept under multiple conditions (*e.g.*, headphone is missing when generating "a `dog wearing a headphone"). Interestingly, we notice that the base model before fine-tuning exhibits the capability to compose the base concept with other elements (*e.g.*, "a dog wearing a headphone"), implying that the compositional ability only disappears after personalization tuning. We observe a semantic shift in the customized concept after fine-tuning, indicating that the personalized concept is not aligned with the original concept, and further show through theoretical analyses that this semantic shift leads to increased difficulty in sampling the joint conditional probability distribution, resulting in the loss of the compositional ability. Inspired by this finding, we present **ClassDiffusion**, a technique that leverages a **semantic preservation loss** to explicitly regulate the concept space when learning a new concept. Although simple, this approach effectively prevents semantic drift during the fine-tuning process of the target concepts. Extensive qualitative and quantitative experiments demonstrate that the use of semantic preservation loss effectively improves the compositional abilities of fine-tuning models. Lastly, we also extend our ClassDiffusion to personalized video generation, demonstrating its flexibility.
