Skip to main content
QUICK REVIEW

[论文解读] Continual Diffusion: Continual Customization of Text-to-Image Diffusion with C-LoRA

James Smith, Yen-Chang Hsu|arXiv (Cornell University)|Apr 12, 2023
Generative Adversarial Networks and Image SynthesisComputer Science被引用 20
一句话总结

引入 C-LoRA,一种连续的、自我正则化的低秩自适应用于 Stable Diffusion 的交叉注意力,以顺序学习细粒度概念而不忘记过去的概念,以及一种随机令牌定制策略。展示在持续文本到图像定制方面的最先进性能,并转移到持续图像分类。

ABSTRACT

Recent works demonstrate a remarkable ability to customize text-to-image diffusion models while only providing a few example images. What happens if you try to customize such models using multiple, fine-grained concepts in a sequential (i.e., continual) manner? In our work, we show that recent state-of-the-art customization of text-to-image models suffer from catastrophic forgetting when new concepts arrive sequentially. Specifically, when adding a new concept, the ability to generate high quality images of past, similar concepts degrade. To circumvent this forgetting, we propose a new method, C-LoRA, composed of a continually self-regularized low-rank adaptation in cross attention layers of the popular Stable Diffusion model. Furthermore, we use customization prompts which do not include the word of the customized object (i.e., "person" for a human face dataset) and are initialized as completely random embeddings. Importantly, our method induces only marginal additional parameter costs and requires no storage of user data for replay. We show that C-LoRA not only outperforms several baselines for our proposed setting of text-to-image continual customization, which we refer to as Continual Diffusion, but that we achieve a new state-of-the-art in the well-established rehearsal-free continual learning setting for image classification. The high achieving performance of C-LoRA in two separate domains positions it as a compelling solution for a wide range of applications, and we believe it has significant potential for practical impact. Project page: https://jamessealesmith.github.io/continual-diffusion/

研究动机与目标

  • 定义 Continual Diffusion 的问题:在不对过去概念进行再训练的前提下,实现文本到图像扩散的连续、细粒度概念定制。
  • 提出 C-LoRA:在交叉注意力中的持续、自我正则化低秩适配器,配以随机、非基于名称的个性化令牌。
  • 证明 C-LoRA 能减轻灾难性遗忘并在持续扩散基准测试中优于基线。
  • 证明 C-LoRA 在回放自由的持续学习图像分类(ImageNet-R)中达到最先进的结果。

提出的方法

  • 仅使用 LoRA 风格的低秩适配器修改 Stable Diffusion 的交叉注意力的 key/value(K,V)投影。
  • 引入一项持续的自我正则化损失,通过过去的 LoRA 增量之和来惩罚对先前自适应权重的改变(Hadamard 正则化)。
  • 将 per-task LoRA 参数与原始权重融合作为 W^{K,V}_{t}=W^{K,V}_{init} + sum_{t'<t} A_{t'}^{K,V} B_{t'}^{K,V} + A_{t}^{K,V} B_{t}^{K,V}。
  • 采用定制令牌策略:添加 N 个个性化令牌,随机初始化,并从提示中移除显式的概念词以减少干扰。
  • 使用简单的指数扫描来控制正则化强度训练,并通过仅更新 LoRA 参数(无存储的重放数据)来降低参数成本。
  • 展示多概念生成能力,并与 Textual Inversion、DreamBooth、Custom Diffusion 以及回放自由的持续学习基线进行对比。
Figure 2: A use case of our work - a mobile app sequentially learns new customized concepts. At a later time, the user can generate photos of prior learned concepts. The user should be able to generate photos with multiple concepts together , thus ruling out simple methods such as per-concept adapte
Figure 2: A use case of our work - a mobile app sequentially learns new customized concepts. At a later time, the user can generate photos of prior learned concepts. The user should be able to generate photos with multiple concepts together , thus ruling out simple methods such as per-concept adapte

实验结果

研究问题

  • RQ1当概念按顺序到来时,能否在不发生灾难性遗忘的情况下进行持续的、细粒度的文本到图像概念定制?
  • RQ2在 Continual Diffusion 中,交叉注意力的自我正则化、低秩自适应(C-LoRA)是否优于现有的扩散定制方法?
  • RQ3个性化令牌的随机初始化和移除概念词是否提升持续学习性能并实现多概念生成?
  • RQ4C-LoRA 的增益是否扩展到像 ImageNet-R 这样的回放自由的图像分类持续学习?
  • RQ5与现有方法(如 Custom Diffusion、LoRA、基于重放的方法)相比,C-LoRA 的参数与隐私影响是什么?

主要发现

  • C-LoRA 在 Celeb-A HQ 和 Google Landmarks 数据集上,显著减少遗忘并提高按序学习概念的最终生成质量。
  • 与 Textual Inversion、DreamBooth 和 Custom Diffusion(顺序/合并)相比,C-LoRA 实现了更低的基于 MMD 的遗忘、更高的跨任务一致性,同时可训练参数显著更少。
  • 一种随机、非基于名称的个性化令牌策略,配合移除对象词,减少概念之间的干扰并提升多概念生成。
  • 该方法在 ImageNet-R 的回放自由持续学习图像分类中达到最先进的性能,超过 LwF、L2P、DualPrompt、CODA-Prompt、以及对照变体。
  • C-LoRA 需要的额外参数成本极小,包含无需重放数据的自我正则化机制,且在面孔和地标领域至少可扩展到 10 个连续概念。
Figure 3: Our method, C-LoRA, updates the key-value (K-V) projection in U-Net cross-attention modules of Stable Diffusion using a continual, self-regulating low-rank weight adaptation. The past LoRA weight deltas are used to regulate the new LoRA weight deltas by guiding which parameters are most av
Figure 3: Our method, C-LoRA, updates the key-value (K-V) projection in U-Net cross-attention modules of Stable Diffusion using a continual, self-regulating low-rank weight adaptation. The past LoRA weight deltas are used to regulate the new LoRA weight deltas by guiding which parameters are most av

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。