Diffscaler: Enhancing the Generative Prowess of Diffusion Transformers

Nithin Gopalakrishnan Nair, Jeya Maria Jose Valanarasu, Vishal M. PatelarXiv 2024 · DOI

Abstract

Large-scale diffusion models often struggle with the "Foundation Model Dilemma," where adapting to new domains requires expensive full-network fine-tuning or massive auxiliary encoders. We present Diffscaler, a parameter-efficient fine-tuning (PEFT) strategy designed specifically for Diffusion Transformers (DiTs). By introducing a lightweight "Affiner" module with less than 1% of the original model's parameters, Diffscaler enables a single pre-trained model to master multiple new datasets and spatial conditioning tasks simultaneously. Our results show that Diffscaler achieves performance comparable to state-of-the-art models like ControlNet while using 40x fewer trainable parameters.

Introduction

Denoising Diffusion Probabilistic Models (DDPMs) have set the gold standard for photorealistic image generation. However, their deployment is often hindered by the computational cost of domain adaptation. Traditional fine-tuning typically involves updating the entire network, which is resource-intensive and prone to "catastrophic forgetting"—the loss of the model's original pre-trained knowledge. While architectures like ControlNet provide task-specific conditioning, they necessitate adding massive separate encoders (often ~300M parameters), significantly increasing system complexity.

Diffscaler addresses these challenges by providing a scalable, modular approach to fine-tuning. It allows a single frozen backbone to be "re-purposed" for diverse tasks through the addition of minimal, independent parameters.

Methodology: The Affiner Module

The core of Diffscaler is the Affiner, a novel plug-in layer inserted into every trainable layer of the frozen pre-trained Diffusion Transformer. The Affiner operates through three primary mechanisms:

  1. Scaling and Shifting: It introduces learnable parameters to scale and shift existing weights and biases, allowing the model to adapt its internal feature representations to new domains.
  2. Low-Rank Adaptation (LoRA): It incorporates a parallel branch for low-rank decomposition ($W_{up}$ and $W_{down}$), enabling the learning of new feature subspaces not present in the original training data.
  3. Incremental Embedding: To accommodate new datasets, the class embedding matrix is expanded. New embeddings are initialized to match the "unconditional" class, providing a stable baseline for training.
Diffscaler enables high-fidelity conditional generation, such as transforming edge maps and depth maps into realistic images, with minimal parameter overhead.

Because these Affiner modules are independent, multiple sets can be stacked onto a single base model, allowing it to switch between different tasks or datasets dynamically without ballooning memory requirements.

Experimental Setup and Datasets

The researchers evaluated Diffscaler across two distinct generative paradigms:

  • Unconditional Generation: Testing on FFHQ (faces), Oxford-flowers, CUB-200 (birds), and Caltech-101.
  • Conditional Generation: Utilizing the COCO dataset to generate synthetic pairs for spatial conditioning, including Canny edge maps, HED maps, Depth maps, and Segmentation maps.

Key Results and Discussion

Diffscaler demonstrates significant improvements in both efficiency and image quality compared to existing PEFT methods and full-scale conditional models.

Superior Fidelity and Efficiency

In unconditional generation, Diffscaler consistently outperformed LoRA and DiffFit. On the FFHQ dataset, Diffscaler achieved an FID score of 15.13, a marked improvement over LoRA (22.46) and DiffFit (30.00). In conditional tasks like Depth-to-Image generation, Diffscaler reached an FID of 17.82, surpassing ControlNet’s 22.09 despite using only 0.5% of the trainable parameters (7M vs. 300M).

The model demonstrates robust performance in incremental dataset addition, successfully learning to generate diverse categories like faces, flowers, birds, and food.

Insights on Architecture and Initialization

A key finding of the study is that Transformer-based diffusion models (DiTs) are inherently more robust for small-data adaptation than CNN-based architectures. While CNNs often failed to produce meaningful samples under tight parameter constraints on datasets like Caltech-101, the DiT backbone maintained high performance. Additionally, the authors noted that initializing low-rank weights with Kaiming normalization significantly improved convergence compared to zero-initialization.

Conclusion

Diffscaler represents a significant step forward in making large-scale diffusion models more accessible and versatile. By decoupling task-specific knowledge from the core model weights through the Affiner module, it provides a path toward multi-task generative systems that are both high-performing and computationally efficient. Future research may extend this architecture to video generation and other multi-modal conditional tasks where parameter efficiency is even more critical.

Summary updated

BibTeX
@misc{nair2024diffscaler,
  author = {Nithin Gopalakrishnan Nair and Jeya Maria Jose Valanarasu and Vishal M. Patel},
  title = {{Diffscaler: Enhancing the Generative Prowess of Diffusion Transformers}},
  year = {2024},
  eprint = {2404.09976},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.09976},
}
Figure