Skip to main content
QUICK REVIEW

[Paper 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 Science20 citations
TL;DR

Introduces C-LoRA, a continual, self-regularized low-rank adaptation for cross-attention in Stable Diffusion to sequentially learn fine-grained concepts without forgetting past ones, plus a random-token customization strategy. Demonstrates state-of-the-art performance in continual text-to-image customization and transfer to continual image classification.

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/

Motivation & Objective

  • Define the problem of Continual Diffusion: sequential, fine-grained concept customization for text-to-image diffusion without re-training on past concepts.
  • Propose C-LoRA: continual, self-regularized low-rank adapters in cross-attention, with random, non-name-based personalized tokens.
  • Show that C-LoRA mitigates catastrophic forgetting and outperforms baselines in continual diffusion benchmarks.
  • Demonstrate that C-LoRA achieves state-of-the-art results in rehearsal-free continual learning for image classification (ImageNet-R).

Proposed method

  • Modify only the cross-attention key/value (K,V) projections in Stable Diffusion using LoRA-style low-rank adapters.
  • Introduce a continual self-regularization loss that penalizes changes to past-adapted weights via the sum of past LoRA deltas (Hadamard-regularization).
  • Use per-task LoRA parameters and fuse them with the original weights as 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}.
  • Adopt a customized token strategy: add N personalized tokens initialized randomly and remove explicit concept words from prompts to reduce interference.
  • Train with a simple exponential sweep for regularization strength and keep parameter cost low by only updating LoRA parameters (no stored replay data).
  • Demonstrate multi-concept generation capability and compare to Textual Inversion, DreamBooth, Custom Diffusion, and rehearsal-free continual learning baselines.
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

Experimental results

Research questions

  • RQ1Can continual, fine-grained text-to-image concept customization be performed without catastrophic forgetting when concepts arrive sequentially?
  • RQ2Does a self-regularized, low-rank adaptation in cross-attention (C-LoRA) outperform existing diffusion customization methods in Continual Diffusion?
  • RQ3Does random initialization of personalized tokens and removal of concept words improve continual learning performance and enable multi-concept generation?
  • RQ4Do the gains of C-LoRA extend to rehearsal-free continual learning in image classification benchmarks like ImageNet-R?
  • RQ5What are the parameter and privacy implications of C-LoRA compared to existing approaches (e.g., Custom Diffusion, LoRA, replay-based methods)?

Key findings

  • C-LoRA significantly reduces forgetting and improves final generation quality for sequentially learned concepts on Celeb-A HQ and Google Landmarks datasets.
  • Compared to Textual Inversion, DreamBooth, and Custom Diffusion (sequential/merge), C-LoRA achieves lower MMD-based forgetting and higher cross-task consistency with far fewer trainable parameters.
  • A random, non-name-based personalized token strategy with removal of object words reduces interference among concepts and improves multi-concept generation.
  • The method attains state-of-the-art performance in rehearsal-free continual learning for image classification on ImageNet-R, outperforming LwF, L2P, DualPrompt, CODA-Prompt, and ablative variants.
  • C-LoRA requires marginal additional parameter costs, contains a self-regularization mechanism without replay data, and scales to at least 10 sequential concepts in both faces and landmark domains.
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

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.