LC Krea2 LoRA Merge
Merging Krea 2 LoRAs Per Block
- model
- model
- merged_lora
Why merge two LoRAs at all
Stacking two LoRA loaders works fine until the LoRAs disagree. Two styles, or two characters, both writing to the same layers means they fight, and the result is either mush or whichever one shouted loudest. Merging gives you a hand on the dial for who wins where, and it gives you a single file you can reuse at strength 1.0 and hand to someone else.
That second part is not a small deal. Krea 2 accumulated character and style LoRAs faster than any model since SDXL, and its own knowledge is broad enough that most style LoRAs are arguably unnecessary - so the interesting merges tend to be two characters, or a character plus a style, which is exactly the case where plain stacking misbehaves.
How it works
It loads two to four LoRA files, maps their keys onto the model's layers, and for every layer works out how much of each source to use:
- A and B follow the curve. Each block's value runs 0 → 1, where 0 = only A, 0.5 = both at full strength, 1 = only B.
- Layers outside the 28 blocks follow the curve's average, so a flat "A only" curve really is A only, instead of leaking B through the text fusion layers.
mixscales the whole thing on top of the curve, like a plain model merge: 0 is A only, 1 is B only, and at 0.5 the bars apply exactly as you set them.- C and D ignore the curve and apply at their own strengths in every block.
Then it picks a method. sum concatenates each LoRA's low-rank up/down factors and applies them as one patch - mathematically the LoRAs added, and fast. ties is the interesting one: it materialises each LoRA's actual delta against the model's weight tensor, keeps each LoRA's strongest changes (that's ties_density - the fraction, by magnitude, that survives), drops the changes where the two pull against each other, and refits the surviving delta back down to a low-rank pair. It's the method for two LoRAs that genuinely clash, and it's slower for the same reason: full layers instead of factors.
The model comes back patched, and you get three heatmaps - A's share, B's share, and the merged result - per layer row and block.
Inputs and outputs that matter
lora_a,lora_bwithstrength_a,strength_b.blocks- 28 values from 0 (A) to 1 (B). Drag the bars; do it andpresetsnaps toCustom.method-sumorties.ties_density-tiesonly. Default 0.5; lower keeps only the biggest changes.mix- the one-slider sleight of hand: push it around to crossfade A and B without redrawing the curve.preset-Both full,A early, B late,B early, A late,A only,B only, and three Face from B windows (8-20, 4-13, 16-21). For Face from B, put the main LoRA (body, style) in A and the face LoRA in B - B gets that block window, A gets the rest. Since face changes live somewhere different in every LoRA, treat those three as starting points and move the bars, or wire a scan curve in.blocks_in(optional) - from LC Krea2 LoRA Block Scan. Wired, it replaces the preset and the bars.lora_c/strength_c,lora_d/strength_d(optional) - a third and fourth LoRA applied everywhere at their own strength.
Outputs: model (patched, into the sampler) and merged_lora, an LC_LORA for LC LoRA Save.
One detail worth knowing: two LoRAs in two stacked loaders and the same two merged with sum produce the same picture, but not bit for bit - one combined patch rounds slightly differently from two separate ones.
Installing it
ComfyUI Manager → search LC ModelBuilder → install → restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/lonecatone23/ComfyUI_LC_ModelBuilder_nodes
Make sure __init__.py is directly inside the pack folder, restart, and hard-refresh with Ctrl+Shift+R for the bars and heatmaps.
No requirements.txt and no extra dependencies - merging and saving are built on ComfyUI core's own LoRA and patch machinery. You need a recent ComfyUI with Krea 2 support (native support arrived in 0.25.0), plus the Qwen3-VL text encoder and Qwen-Image VAE that Krea 2 needs.
Where people get burned
Beta, and it means it. The four LoRA nodes in this pack are still being tested on more LoRAs; presets and defaults can change between versions. Keep your source files, and check a merge on a fixed seed before you commit to it.
"Some layers do not match this model: are they all Krea 2 LoRAs?" shows up in the heatmap note when key mapping missed. Mixing in a LoRA from another architecture gets you a partial merge that looks plausible and isn't.
ties is slow. It rebuilds full-size deltas per layer, so on a big merge expect to wait - and if the model's weight tensors aren't available for a key, that layer is skipped.
Merged layers are refit to at most rank 128. Bumping strength_a/strength_b and then saving won't get you the fidelity of the originals; if a merge looks softer than the two LoRAs stacked, that's part of why.
The merged LoRA isn't a file yet. Wire merged_lora into LC LoRA Save, or it dies with the workflow.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | Krea 2 model. The merged LoRA is applied to it, like a LoRA loader. | |
| lora_a | COMBO | LoRA A, from models/loras. | |
| lora_b | COMBO | LoRA B, from models/loras. | |
| strength_a | FLOAT | 1.00-4–4 | — |
| strength_b | FLOAT | 1.00-4–4 | — |
| mix | FLOAT | 0.500–1 | One slider for the whole merge, like a plain model merge: 0 = only LoRA A, 1 = only LoRA B. At 0.5 the bars apply as set; toward 0 B fades out everywhere, toward 1 A does. |
| method | COMBO | sum | sum = the LoRAs added, exactly (fast). ties = keeps each LoRA's strongest changes and drops the ones that fight each other: for LoRAs that clash, e.g. two styles or two characters. Slower (works on every full layer). |
| preset | COMBO | Both full | Per block: 0 = only A, 0.5 = both at full strength, 1 = only B. Dragging the graph switches to Custom. |
| blocks | STRING | 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 | 28 block values, 0 (A) to 1 (B). Drag the bars on the node. |
| ties_density | FLOAT | 0.500.05–1 | ties only: share of each LoRA's changes that is kept (its strongest). Lower = only the most important changes survive. |
| blocks_inopt | STRING | A 28-block curve from another node. When wired it replaces the preset and the bars. | |
| lora_copt | COMBO | None | Optional third LoRA, at strength_c in every block (not on the curve). |
| strength_copt | FLOAT | 1.00-4–4 | — |
| lora_dopt | COMBO | None | Optional fourth LoRA, at strength_d in every block (not on the curve). |
| strength_dopt | FLOAT | 1.00-4–4 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| model | MODEL | The model with the merged LoRA applied. |
| merged_lora | LC_LORA | The merged LoRA, for LC LoRA Save. |