DiffFit: Unlocking Transferability of Large Diffusion Models via Simple Parameter-Efficient Fine-Tuning

Enze Xie, Lewei Yao, Han Shi, Zhili Liu, Daquan Zhou, Zhaoqiang Liu, Jiawei Li, Zhenguo Li

Abstract

As diffusion models grow in scale and complexity, the computational and storage costs associated with full fine-tuning become increasingly prohibitive. This paper introduces DiffFit, a parameter-efficient fine-tuning (PEFT) strategy designed specifically for large-scale diffusion models like the Diffusion Transformer (DiT). By updating only 0.12% of the model's parameters, DiffFit achieves state-of-the-art performance on high-resolution image synthesis and various downstream tasks. Notably, it reaches an FID of 3.02 on ImageNet 512×512, outperforming full fine-tuning while being 30× more training-efficient.

Introduction

State-of-the-art diffusion models, such as the Diffusion Transformer (DiT) and DALL·E 2, have revolutionized generative AI. However, their massive scale presents two primary challenges: the immense GPU resources required for adaptation and the storage overhead of maintaining separate model weights for every new task. For instance, adapting a billion-parameter model to ten different domains typically requires storing ten distinct, multi-gigabyte files.

DiffFit addresses these hurdles by providing an inexpensive way to adapt pre-trained giants to new datasets and higher resolutions without sacrificing image quality. By freezing the majority of the network and focusing on a tiny fraction of learnable parameters, DiffFit enables rapid, low-cost adaptation that is accessible to researchers with limited compute budgets.

The DiffFit Methodology

The core philosophy of DiffFit is to identify and update only the most critical components for domain adaptation. The strategy consists of three primary technical pillars:

1. Selective Unfreezing

Rather than updating all weights, DiffFit freezes the backbone of the model and only unfreezes the bias terms, normalization layers (LayerNorm), and class embeddings. This significantly reduces the gradient computation requirements and the final checkpoint size.

2. Learnable Scaling Factors ((\gamma))

The "secret sauce" of DiffFit is the insertion of learnable scalars, denoted as (\gamma), into specific layers—specifically the self-attention and feed-forward blocks. Initialized to 1.0, these factors allow the model to dynamically scale feature activations. Theoretical analysis suggests that many domain shifts can be modeled as linear transformations; these (\gamma) factors act as a bridge that shifts the source distribution to the target distribution with minimal overhead.

3. Positional Encoding for Resolution Scaling

To adapt a model trained at 256×256 resolution to 512×512, the authors treat the resolution change as a domain shift. They employ a sinusoidal interpolation trick: by halving the coordinates in the positional encoding formula, the model can "stretch" its spatial understanding to higher resolutions. This allows the model to leverage its pre-trained spatial priors while learning the nuances of higher-density pixel data in just a few training epochs.

Experimental Results

Performance and Efficiency

The researchers evaluated DiffFit across a wide array of benchmarks, including ImageNet and eight specialized downstream datasets (e.g., Food101, SUN397, Caltech101, and Oxford Flowers).

  • State-of-the-Art Quality: On ImageNet 512×512, DiffFit achieved a new SOTA FID of 3.02, surpassing the previous best of 3.04.
  • Extreme Efficiency: Only 0.83M parameters (0.12% of the total) are trainable in the DiT-XL/2 model. This results in a 99.88% reduction in storage requirements per task.
  • Training Speed: DiffFit is approximately 30× more efficient than previous high-resolution adaptation methods, reaching peak performance in just 25 epochs when starting from a 256×256 checkpoint.

Comparison with Other PEFT Methods

DiffFit consistently outperformed established parameter-efficient methods such as LoRA (Low-Rank Adaptation), BitFit, and VPT (Visual Prompt Tuning). In many cases, DiffFit not only matched but exceeded the performance of full fine-tuning, suggesting that the constrained parameter space may act as a regularizer that prevents overfitting on smaller downstream datasets.

Key Insights

  • Layer Sensitivity: The authors found that adding scaling factors to every layer is not optimal. The best results were achieved by modifying the first 14 layers of the DiT-XL/2 model. This suggests that deeper layers contain high-level, abstract patterns that are best left untouched to preserve the model's generative foundations.
  • Versatility: Beyond image generation, the logic of DiffFit was successfully applied to ControlNet (using COCO-Stuff), DreamBooth, and even Large Language Models like LLaMA, demonstrating its potential as a general-purpose adaptation strategy.

Conclusion and Future Work

DiffFit demonstrates that adapting massive diffusion models does not require massive compute. By focusing on selective unfreezing and learnable scaling factors, the method achieves superior image quality with a fraction of the parameters. Future research directions include extending DiffFit to more complex generative tasks, such as video and 3D synthesis, and exploring its utility in even larger-scale foundation models.

Summary updated

BibTeX
@inproceedings{xie2023difffit,
  author = {Enze Xie and Lewei Yao and Han Shi and Zhili Liu and Daquan Zhou and Zhaoqiang Liu and Jiawei Li and Zhenguo Li},
  title = {{DiffFit: Unlocking Transferability of Large Diffusion Models via Simple Parameter-Efficient Fine-Tuning}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
}
Figure