Z-Image LoRA Merge to Single
A real weight merge, with a rank caveat
- model
- clip
- model
- clip
The main Merger node normalizes strengths but still applies your LoRAs one after another - the effects stay stacked. Merge to Single takes a different route: it merges the LoRA weight files themselves into one combined set of weights, then applies that as a single LoRA patch. Instead of model → LoRA → LoRA → LoRA, your graph stays model → one LoRA apply. Same result, single pass, and for same-rank LoRAs it's the "optimal for Z-Image Turbo" option the description promises.
How the merge works
It walks every weight key present in any of your LoRAs. Keys that exist in more than one LoRA get combined per the merge_method; keys that only one LoRA has are just scaled by that LoRA's weight and carried along. Three methods:
- weighted_average (default): each tensor scaled by its weight, then averaged. The safe, balanced choice.
- weighted_sum: straight A + B (+ C). Brighter, and it can push right back into the overexposure this pack exists to avoid.
- add_difference: A + (B − A) × weight - the classic "add difference" move from checkpoint merging, for when you want to steer one LoRA with another.
Then output_strength (0–2) scales the whole merged result, and the merged weights are applied as one patch with clip_strength_multiplier for the CLIP side. Up to three LoRAs, each with its own weight - note these only go positive (0–2), unlike the strength fields elsewhere in the pack.
The caveat, and it's a real one
This node wants same-rank LoRAs. The author's own comparison table marks different ranks as "no," and the code shows why: when two LoRAs hold tensors of different shapes on the same key - which is exactly what different ranks produce - it can't average them. It falls back to whichever tensor is compatible and logs a warning. A rank-32 plus rank-256 pairing will quietly degrade, not error. That's what Z-Image LoRA True Merge is for; reach for that when ranks genuinely differ.
If your LoRAs are all the same rank (the common case), this is a tidy way to get a genuine blend rather than a scaled stack, at medium memory cost. And because the merge happens on the weights before patching, you only touch the model once.
Install
Same as the whole pack - no pip dependencies, no model downloads:
ComfyUI Manager → search "Z-Image LoRA Merger" → install → restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/DanrisiUA/ComfyUI-ZImage-LoRA-Merger
Restart, and look in loaders/lora. If a merge comes out wrong, check your ComfyUI console for "incompatible shapes" warnings - that's the mixed-rank fallback telling you it couldn't do the honest math.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| merge_method | COMBO | weighted_average | 3 options: weighted_sum, add_difference, weighted_average |
| output_strength | FLOAT | 1.000–2 | Strength of the merged LoRA |
| lora_1 | COMBO | 1 options: None | |
| weight_1 | FLOAT | 1.000–2 | — |
| lora_2 | COMBO | 1 options: None | |
| weight_2 | FLOAT | 1.000–2 | — |
| lora_3opt | COMBO | 1 options: None | |
| weight_3opt | FLOAT | 1.000–2 | — |
| clip_strength_multiplieropt | FLOAT | 1.000–2 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| clip | CLIP | — |