Abstract: Low-Rank Adaptation (LoRA) has emerged as a powerful technique for parameter-efficient fine-tuning of large language models. However, combining multiple LoRAs trained on different subjects and styles remains challenging, often requiring retraining or complex fusion methods. We introduce K-LoRA, a novel approach that enables training-free fusion of any subject and style LoRAs. K-LoRA leverages kernel-based interpolation to seamlessly combine the learned representations from multiple LoRAs, preserving their individual characteristics while enabling new, coherent outputs. Our experiments demonstrate that K-LoRA outperforms existing methods in terms of both flexibility and quality, opening up new possibilities for creative applications of LoRA-based models. Keywords: LoRA, parameter-efficient fine-tuning, model fusion, kernel interpolation, creative AIK-LoRA: Trainingfreie Fusion von beliebigen Subjekt- und Stil-LoRAs Zusammenfassung: Low-Rank Adaptation (LoRA) hat sich als leistungsstarke Technik für parameter-effizientes Fine-Tuning von großen Sprachmodellen etabliert. Die Kombination mehrerer LoRAs, die auf verschiedenen Themen und Stilen trainiert wurden, bleibt jedoch eine Herausforderung und erfordert oft ein erneutes Training oder komplexe Fusionsmethoden. Wir stellen K-LoRA vor, einen neuartigen Ansatz, der eine trainingfreie Fusion von beliebigen Subjekt- und Stil-LoRAs ermöglicht. K-LoRA nutzt kernelbasierte Interpolation, um die gelernten Repräsentationen mehrerer LoRAs nahtlos zu kombinieren, wobei deren individuelle Eigenschaften erhalten bleiben und gleichzeitig neue, kohärente Ausgaben ermöglicht werden. Unsere Experimente zeigen, dass K-LoRA bestehende Methoden in Bezug auf Flexibilität und Qualität übertrifft und neue Möglichkeiten für kreative Anwendungen von LoRA-basierten Modellen eröffnet. Schlüsselwörter: LoRA, parameter-effizientes Fine-Tuning, Modellfusion, Kernelinterpolation, kreative KI
K-LoRA: Unlocking Training-Free Fusion of Any Subject and Style LoRAs
February 25, 2025
Autoren: Ziheng Ouyang, Zhen Li, Qibin Hou
cs.AI
Zusammenfassung
Aktuelle Studien haben die Kombination verschiedener LoRAs untersucht, um gelernte Stile und Inhalte gemeinsam zu erzeugen. Bisherige Methoden scheitern jedoch entweder daran, sowohl das ursprüngliche Subjekt als auch den Stil effektiv gleichzeitig zu bewahren, oder sie erfordern zusätzliches Training. In diesem Artikel argumentieren wir, dass die intrinsischen Eigenschaften von LoRA Diffusionsmodelle effektiv bei der Verschmelzung von gelerntem Subjekt und Stil leiten können. Aufbauend auf dieser Erkenntnis schlagen wir K-LoRA vor, einen einfachen, aber effektiven trainingsfreien Ansatz zur LoRA-Fusion. In jeder Aufmerksamkeitsschicht vergleicht K-LoRA die Top-K-Elemente in den zu verschmelzenden LoRAs, um zu bestimmen, welche LoRA für eine optimale Fusion ausgewählt werden soll. Dieser Auswahlmechanismus stellt sicher, dass die repräsentativsten Merkmale sowohl des Subjekts als auch des Stils während des Fusionsprozesses erhalten bleiben und ihre Beiträge effektiv ausbalanciert werden. Experimentelle Ergebnisse zeigen, dass die vorgeschlagene Methode die vom ursprünglichen LoRA erlernten Subjekt- und Stilinformationen effektiv integriert und sowohl in qualitativen als auch quantitativen Ergebnissen state-of-the-art, trainingsbasierte Ansätze übertrifft.
English
Recent studies have explored combining different LoRAs to jointly generate
learned style and content. However, existing methods either fail to effectively
preserve both the original subject and style simultaneously or require
additional training. In this paper, we argue that the intrinsic properties of
LoRA can effectively guide diffusion models in merging learned subject and
style. Building on this insight, we propose K-LoRA, a simple yet effective
training-free LoRA fusion approach. In each attention layer, K-LoRA compares
the Top-K elements in each LoRA to be fused, determining which LoRA to select
for optimal fusion. This selection mechanism ensures that the most
representative features of both subject and style are retained during the
fusion process, effectively balancing their contributions. Experimental results
demonstrate that the proposed method effectively integrates the subject and
style information learned by the original LoRAs, outperforming state-of-the-art
training-based approaches in both qualitative and quantitative results.Summary
AI-Generated Summary