Sign In

Merging Lora's with cgem156 in ComfyUI

9
Jan 21, 2025
tool guide
Merging Lora's with cgem156 in ComfyUI

Just for those who wonder if it is possible to merge LORA's together directly in ComfyUI without using any base model.

This works on both SD, FLUX and SDXL LORA's aslong as you merge LORA's that are trained on the same base model.

Attached the workflow.

Merge modes:

add

Will just add both lora's into 1 file, this will often result into overburning when weights are added together, best to feed it with lower strength lora weights.

concat

Will just contact both lora's into 1 file, this works if you want to concatinate 2 complete different styles with different trigger words into 1 Lora.

svd

Will use a complex method to merge the LORA's.

This will give a complete new LORA that gives a blend style output of the 2 LORA's combined.

Almost simular like when you stack lora's in normal configuration. But still a bit diffrent and extreem experimental. Note: SVD merge will recalculate all weights into a new LORA this process might take 10-15 minutes of your GPU, the other 2 modes will almost instantly merge on CPU.

the output of SVD can differ between very small up to about 300MB in size as it might touch more variables during merge. But often SVD is de best mode to get what you want without overburning or generating an unusable LORA.

More info about SVD: https://www.geeksforgeeks.org/singular-value-decomposition-svd/

9

Comments