K-LoRA: Unlocking Training-Free Fusion of Any Subject and Style LoRAs
Ziheng Ouyang, Zhen Li, Qibin Hou
TL;DR
K-LoRA addresses the challenge of training-free fusion of subject and style LoRAs in diffusion-based image generation. It introduces a Top-K, step-aware attention fusion mechanism that selectively combines content and style LoRAs per layer, guided by the sums of the dominant Top-K elements and diffusion-time scaling, with a gamma-balanced factor to harmonize sources. The approach achieves superior quantitative alignment (StyleSim, CLIP, DINO) and robust qualitative results compared to training-based baselines, while requiring no retraining. This method enables precise stylized content fusion across diverse styles and subjects, with practical applicability to existing LoRA weights and diffusion models.
Abstract
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.
