ZipLoRA: Any Subject in Any Style by Effectively Merging LoRAs
Viraj Shah, Nataniel Ruiz, Forrester Cole, Erika Lu, Svetlana Lazebnik, Yuanzhen Li, Varun Jampani
TL;DR
ZipLoRA tackles the challenge of generating a specific subject in any given style by merging independently trained subject and style LoRAs. It introduces a lightweight, hyperparameter-free optimization that learns per-column merger coefficients to minimize interference between LoRAs, while preserving each LoRA's original capabilities. The method relies on three key insights: sparsity of LoRA updates, strong single-exemplar style learning in SDXL, and the detrimental effect of highly aligned LoRA columns when naively merged. Empirically, ZipLoRA outperforms direct merges and joint training across diverse subject-style pairs, with favorable user preferences and robust recontextualization and style controllability, all while requiring only about 100 gradient steps. This approach offers a scalable, practical path to flexible diffusion-model personalization without extensive retraining or hyperparameter tuning.
Abstract
Methods for finetuning generative models for concept-driven personalization generally achieve strong results for subject-driven or style-driven generation. Recently, low-rank adaptations (LoRA) have been proposed as a parameter-efficient way of achieving concept-driven personalization. While recent work explores the combination of separate LoRAs to achieve joint generation of learned styles and subjects, existing techniques do not reliably address the problem; they often compromise either subject fidelity or style fidelity. We propose ZipLoRA, a method to cheaply and effectively merge independently trained style and subject LoRAs in order to achieve generation of any user-provided subject in any user-provided style. Experiments on a wide range of subject and style combinations show that ZipLoRA can generate compelling results with meaningful improvements over baselines in subject and style fidelity while preserving the ability to recontextualize. Project page: https://ziplora.github.io
