LoRA Conflict Editor
Take manual control when the automatic merge isn't enough
- lora_stack
- lora_stack
- analysis_report
- merge_strategy
LoRA Optimizer's default behavior is automatic on purpose - it analyzes conflicts and picks a strategy per layer without asking you anything. Most of the time that's exactly what you want. But automatic means the optimizer is guessing at intent from the numbers alone, and sometimes you know something it doesn't: you know two specific LoRAs in your stack are going to clash and you want one to win outright, or you know two of your LoRAs are near-duplicates (say, two checkpoints from the same training run) and want them treated as agreeing rather than conflicting. LoRA Conflict Editor is where you override the automatic read with what you actually know.
How it works
It sits between a LoRA Stack and LoRA Optimizer. Feed it a stack, and it loads every LoRA, computes full-rank diffs, measures pairwise sign disagreement, and auto-suggests both a per-LoRA conflict_mode and an overall merge_strategy. You can take its suggestions as-is or override any of them by hand - it's a diagnosis-plus-editable-prescription tool, not a black box.
The merge_strategy options are worth understanding individually, since this is the one node in the pack where you pick one directly rather than letting the optimizer choose per-layer: ties forces TIES-Merging everywhere (good for genuinely high-conflict stacks), slerp forces spherical interpolation (magnitude-preserving, suited to low-conflict pairs), weighted_average is straightforward blending for compatible LoRAs, and weighted_sum is direct addition that preserves every weight exactly. The one that doesn't get explained in the README's main sections is consensus - the pack's author described it directly in a community thread as a three-part method (Fisher-proxy weighting, magnitude calibration, and spectral cleanup) built specifically for merging extremely similar LoRAs, like two checkpoints from the same training run at different steps. If you've ever trained the same concept twice and wondered whether averaging the results would beat either one alone, consensus is the mode built for that case - the author flagged it as still relatively fresh and less battle-tested than the others, so treat it as a tool worth trying rather than a guaranteed win.
The inputs and outputs that matter
lora_stack(required) - the stack to analyze. Connect it before the Optimizer, not after.merge_strategy(defaultauto) -autolets the optimizer decide per-layer as normal; anything else forces that one strategy across the whole stack.conflict_mode_1throughconflict_mode_10(defaultautoeach) - per-LoRA override, one slot per LoRA position in the stack.autotakes the node's own suggestion;all/low_conflict/high_conflictwork the same as everywhere else in the pack - force this LoRA to apply everywhere, only where it agrees with the majority, or only where it disagrees.
Outputs: lora_stack - the same stack, enriched with your conflict decisions, ready to feed into LoRA Optimizer. analysis_report - wire to Show Text to actually see the conflict data the suggestions were based on. merge_strategy - the resolved strategy as a STRING, which is also what the Optimizer Settings node's merge_strategy_override input expects if you want to pass it along explicitly.
How to install it
ComfyUI Manager: search "LoRA Optimizer", install, restart. Manually:
cd ComfyUI/custom_nodes/
git clone https://github.com/ethanfel/ComfyUI-LoRA-Optimizer.git
Restart - it's under loaders. No downloads; it works on the LoRA files in your stack.
Common issues & troubleshooting
You forced a strategy and results got worse, not better. That's a real possibility, not just user error - the automatic per-layer decision exists because a single global strategy is often a worse fit than letting different weight groups get different treatment. If forcing ties or slerp everywhere hurts a stack, that's a sign this particular stack benefited from the automatic mixed approach; go back to auto on the Optimizer instead of the Conflict Editor.
Trying to merge two very similar LoRAs and it still looks off. This is specifically what consensus targets. Set merge_strategy to consensus rather than leaving it on auto or forcing ties - a high-similarity pair is exactly the case regular conflict resolution isn't optimized for.
Suggestions don't match what you'd expect from listening to the LoRAs' descriptions alone. The suggestions come from measuring actual weight-level sign disagreement, not from anything semantic about what the LoRAs are "about." Two LoRAs that sound unrelated (a hairstyle LoRA and a lighting LoRA) can still show real numeric conflict if they happen to touch overlapping layers - trust the report over intuition here.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| lora_stack | LORA_STACK | Connect a LoRA Stack node here. The editor will analyze conflicts between these LoRAs. | |
| merge_strategy | COMBO | auto | Merge strategy to pass to the optimizer. 'auto': let the optimizer decide based on conflict analysis. 'ties': force TIES merging (good for high-conflict stacks). 'consensus': force Fisher-proxy + magnitude calibration + spectral cleanup (good for highly similar LoRAs). 'slerp': force spherical interpolation (magnitude-preserving, good for low-conflict stacks). 'weighted_average': force simple averaging (good for compatible LoRAs). 'weighted_sum': force direct addition (preserves all weights exactly). |
| conflict_mode_1 | COMBO | auto | LoRA #1 conflict filter. 'auto': node suggests based on analysis. 'all': apply everywhere. 'low_conflict': only where this LoRA agrees with the majority. 'high_conflict': only where this LoRA disagrees. |
| conflict_mode_2 | COMBO | auto | LoRA #2 conflict filter. 'auto': node suggests based on analysis. 'all': apply everywhere. 'low_conflict': only where this LoRA agrees with the majority. 'high_conflict': only where this LoRA disagrees. |
| conflict_mode_3 | COMBO | auto | LoRA #3 conflict filter. 'auto': node suggests based on analysis. 'all': apply everywhere. 'low_conflict': only where this LoRA agrees with the majority. 'high_conflict': only where this LoRA disagrees. |
| conflict_mode_4 | COMBO | auto | LoRA #4 conflict filter. 'auto': node suggests based on analysis. 'all': apply everywhere. 'low_conflict': only where this LoRA agrees with the majority. 'high_conflict': only where this LoRA disagrees. |
| conflict_mode_5 | COMBO | auto | LoRA #5 conflict filter. 'auto': node suggests based on analysis. 'all': apply everywhere. 'low_conflict': only where this LoRA agrees with the majority. 'high_conflict': only where this LoRA disagrees. |
| conflict_mode_6 | COMBO | auto | LoRA #6 conflict filter. 'auto': node suggests based on analysis. 'all': apply everywhere. 'low_conflict': only where this LoRA agrees with the majority. 'high_conflict': only where this LoRA disagrees. |
| conflict_mode_7 | COMBO | auto | LoRA #7 conflict filter. 'auto': node suggests based on analysis. 'all': apply everywhere. 'low_conflict': only where this LoRA agrees with the majority. 'high_conflict': only where this LoRA disagrees. |
| conflict_mode_8 | COMBO | auto | LoRA #8 conflict filter. 'auto': node suggests based on analysis. 'all': apply everywhere. 'low_conflict': only where this LoRA agrees with the majority. 'high_conflict': only where this LoRA disagrees. |
| conflict_mode_9 | COMBO | auto | LoRA #9 conflict filter. 'auto': node suggests based on analysis. 'all': apply everywhere. 'low_conflict': only where this LoRA agrees with the majority. 'high_conflict': only where this LoRA disagrees. |
| conflict_mode_10 | COMBO | auto | LoRA #10 conflict filter. 'auto': node suggests based on analysis. 'all': apply everywhere. 'low_conflict': only where this LoRA agrees with the majority. 'high_conflict': only where this LoRA disagrees. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| lora_stack | LORA_STACK | — |
| analysis_report | STRING | — |
| merge_strategy | STRING | — |