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 (24)
| Name | Type | Default | Description |
|---|---|---|---|
| execution_mode | COMBO | MERGE writes the selected result; DOCUMENTATION ONLY returns the operation reference without loading model files. | |
| model_a | COMBO | Primary LoRA; anchors metadata, tensor shapes, and values preserved by exclusions or skip handling. | |
| model_b | COMBO | Second LoRA contributing to the selected calculation mode. | |
| model_c | COMBO | Third LoRA contributing to the selected three-model calculation mode. | |
| calc_mode | COMBO | Three-model operation to apply per comparable tensor; DOCUMENTATION ONLY shows its formula and coefficient meanings. | |
| mismatch_mode | COMBO | skip | Handle missing or incompatible tensors: preserve Model A, substitute zeros where supported, or abort with an error. |
| alignment_mode | COMBO | pad/crop | Resolve compatible shape differences by zero-padding/cropping or by interpolating Model B and Model C to Model A shape. |
| alpha | FLOAT | 0.50-10–10 | Mode-specific coefficient; use DOCUMENTATION ONLY for its exact role in the selected calculation mode. |
| beta | FLOAT | 0.50-10–10 | Mode-specific coefficient; some calculation modes ignore it. See DOCUMENTATION ONLY for the selected formula. |
| gamma | FLOAT | 0.50-10–10 | Mode-specific coefficient; some calculation modes ignore it. See DOCUMENTATION ONLY for the selected formula. |
| delta | FLOAT | 2.00-10–10 | Mode-specific coefficient; some calculation modes ignore it. See DOCUMENTATION ONLY for the selected formula. |
| epsilon | FLOAT | 0.01-10–10 | Mode-specific coefficient; some calculation modes ignore it. See DOCUMENTATION ONLY for the selected formula. |
| zeta | FLOAT | 0.00-10–10 | Mode-specific coefficient; some calculation modes ignore it. See DOCUMENTATION ONLY for the selected formula. |
| seed | INT | 00–18446744073709550000 | Random seed used only by calculation modes with stochastic behavior. |
| output_filename | STRING | merged_3_lora | Output filename without extension, written under the matching ComfyUI model directory. |
| save_dtype | COMBO | Output tensor dtype; when Override Dtype is disabled, source tensors with higher precision remain at that precision. | |
| process_device | COMBO | Device used for per-tensor merge arithmetic; CUDA out-of-memory retries the affected tensor on CPU. | |
| exclude_patterns | STRING | Newline-separated regex or glob patterns for tensors excluded from merging and preserved from Model A. | |
| discard_patterns | STRING | Newline-separated regex or glob patterns for tensors omitted entirely from the output. | |
| 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 merged non-1D tensors to save_dtype. Enabled 1D direct diffs remain FP32. |
| include_1d_diffs | BOOLEAN | false | Merge 1D tensors. When disabled, preserve Model A's 1D tensors unchanged. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| output_filename | * | — |
| documentation | STRING | — |