Not All Layers Are Created Equal: Adaptive LoRA Ranks for Personalized Image Generation
Organizations: University of Pisa · NEC Laboratories Europe
Abstract
Low Rank Adaptation (LoRA) is the de facto fine-tuning strategy to generate personalized images from pre-trained diffusion models. Choosing a good rank is extremely critical, since it trades off performance and memory consumption, but today the decision is often left to the community's consensus, regardless of the personalized subject's complexity. The reason is evident: the cost of selecting a good rank for each LoRA component is combinatorial, so we opt for practical shortcuts such as fixing the same rank for all components. In this paper, we take a first step to overcome this challenge. Inspired by variational methods that learn an adaptive width of neural networks, we let the ranks of each layer freely adapt during fine-tuning on a subject. We achieve it by imposing an ordering of importance on the rank's positions, effectively encouraging the creation of higher ranks when strictly needed. Qualitatively and quantitatively, our approach, LoRA, achieves a competitive trade-off between DINO, CLIP-I, and CLIP-T across 29 subjects while requiring much less memory and lower rank than high rank LoRA versions. Code: https://github.com/donaldssh/NotAllLayersAreCreatedEqual.
Figures & tables
| Backbone | Method | DINO | CLIP-I | CLIP-T | File size |
|---|---|---|---|---|---|
| SDXL | LoRA 2 | 0.689 | 0.773 | 0.313 | 406 MB |
| LoRA 2 ( ) | 0.696 | 0.780 | 0.303 | 410 MB | |
| LoRA 2 ( ) | 0.699 | 0.782 | 0.299 | 2.7 GB | |
| KOALA-700m | LoRA 2 | 0.680 | 0.760 | 0.308 | 158 MB |
| LoRA 2 ( ) | 0.681 | 0.762 | 0.304 | 160 MB | |
| LoRA 2 ( ) | 0.693 | 0.768 | 0.302 | 734 MB |
| Subject | Prompt |
|---|---|
| backpack | a <c> backpack on a wooden shelf surrounded by books |
| a modern minimalistic <c> backpack on a white surface | |
| a <c> backpack in the snow under warm sunlight | |
| a <c> backpack on a cobblestone street after rain | |
| a vintage <c> backpack on an antique table | |
| a <c> backpack placed on pink silk fabric |
Low-Rank Adaptation
Low-rank adaptation (LoRA) fine-tunes pretrained models with compact weight updates, reducing trainable parameters and deployment costs.
See all 514 papers