Merge LoRAs (3 Models)
Three LoRA files through the generic weighted-merge engine
- output_filename
- documentation
LoRATwoMerger with a third slot. Same caveat applies here even more than there: this pack has two separate systems for combining LoRAs, and this one is the generic one - the same weighted-merge engine that powers CheckpointThreeMerger and ModelThreeMerger, just pointed at three LoRA files instead. It treats each LoRA's tensors as arbitrary weights to blend, without any rank-aware logic. If you want to actually stack several trained adapters cleanly - reconciling different ranks and naming conventions on purpose - this pack's LoRAMultiMerge node (up to eight LoRAs, with an explicit concatenate-vs-weighted-sum choice) is the more purpose-built tool. Reach for this one when you specifically want three LoRAs blended with the same math you'd use to blend three checkpoints.
How it works
model_a, model_b, model_c are your three source LoRAs. calc_mode picks the merge algorithm (option list not documented in the schema - check the dropdown on your install). The six weight knobs follow this pack's three-input pattern: alpha, beta, gamma default to 0.5 each (one knob per source), delta to 2, epsilon to 0.01, zeta to 0 - identical to CheckpointThreeMerger and ModelThreeMerger. None carry tooltips, so treat the defaults as your best clue until you know what a particular calc_mode does with them.
mismatch_mode (default skip) and alignment_mode (default pad/crop) are doing real work here - three LoRAs from three different training runs very plausibly have three different ranks and three different naming schemes, and this is what keeps the merge from erroring out on the first shape mismatch it hits. exclude_patterns/discard_patterns (regex, glob with glob_patterns on) let you scope specific layers out. lazy_load and force_clear_cache handle memory (less of a concern here than with three full checkpoints - LoRAs are small), save_dtype/override_dtype control output precision, process_device picks CPU or GPU, and seed covers whichever calc_mode involves randomness. Output is output_filename (default merged_3_lora) and a documentation string.
Installing it
ComfyUI Manager: search Model Utility Toolkit, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-ModelUtils
Restart ComfyUI. No downloads needed beyond the LoRA files themselves.
Where people get burned
Three LoRAs averaged generically is a rougher operation than it sounds. Rank mismatches, different training conventions, different base architectures - any one of these across your three sources means the merge is reconciling shape differences (via mismatch_mode/alignment_mode) rather than genuinely combining trained knowledge. The result can load and run and still look worse than any one of the three sources at full strength, because you've diluted three low-rank approximations into one without the rank-aware reconstruction that LoRAMultiMerge's weighted_sum mode does on purpose. If that's what you're actually after - combining several character or style LoRAs into a single portable file - try that node first and come back to this one if you specifically need the generic engine's flexibility (arbitrary calc_mode, exclude/discard patterns, precision control) that LoRAMultiMerge doesn't expose.
Architecture mismatch remains absolute regardless of node: a LoRA trained for one base model contributes nothing useful when merged into a LoRA stack for a different one.
Inputs (23)
| Name | Type | Default | Description |
|---|---|---|---|
| execution_mode | COMBO | 2 options: MERGE, DOCUMENTATION ONLY | |
| model_a | COMBO | 1 options: None | |
| model_b | COMBO | 1 options: None | |
| model_c | COMBO | 1 options: None | |
| calc_mode | COMBO | 4 options: Add-Difference, Train-Difference, Extract-Features, Add-Dissimilarities | |
| mismatch_mode | COMBO | skip | 3 options: skip, zeros, error |
| alignment_mode | COMBO | pad/crop | 2 options: pad/crop, interpolate |
| alpha | FLOAT | 0.50-10–10 | — |
| beta | FLOAT | 0.50-10–10 | — |
| gamma | FLOAT | 0.50-10–10 | — |
| delta | FLOAT | 2.00-10–10 | — |
| epsilon | FLOAT | 0.01-10–10 | — |
| zeta | FLOAT | 0.00-10–10 | — |
| seed | INT | 00–18446744073709550000 | — |
| output_filename | STRING | merged_3_lora | — |
| save_dtype | COMBO | 3 options: fp32, fp16, bf16 | |
| process_device | COMBO | 2 options: cuda, cpu | |
| exclude_patterns | STRING | — | |
| discard_patterns | STRING | — | |
| glob_patterns | BOOLEAN | false | When True, exclude/discard patterns use glob syntax (* = any sequence, dots are literal). When False (default), patterns are Python regex matched as substrings. |
| lazy_load | BOOLEAN | true | Low memory mode: load tensors from disk on demand |
| force_clear_cache | BOOLEAN | true | Clear CUDA cache after each layer |
| override_dtype | BOOLEAN | false | Force the entire model to be saved as the selected save_dtype. If False (default), higher precision dtypes are preserved. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| output_filename | STRING | — |
| documentation | STRING | — |