Nodes/Model Utility Toolkit/LoRA Multi-Merge (Enhanced DARE-Ties)
ComfyUI Node

LoRA Multi-Merge (Enhanced DARE-Ties)

LoRA Multi-Merge (Enhanced DARE-Ties) — magnitude-aware LoRA merging for up to 8 LoRAs

By silveroxides·Created about a year ago·Updated 7 days ago· 16
LoRA Multi-Merge (Enhanced DARE-Ties)
    • output_path
    base_modelNone
    lora_count2
    lora_1
    weight_11.00
    lora_2None
    weight_21.00
    lora_3None
    weight_31.00
    lora_4None
    weight_41.00
    lora_5None
    weight_51.00
    lora_6None
    weight_61.00
    lora_7None
    weight_71.00
    lora_8None
    weight_81.00
    mask_power2.00
    min_keep_prob0.01
    mask_smooth0.00
    trim_quantile0.20
    seed42
    output_filenamemerged_lora_dare_enhanced
    save_dtypefp16
    devicecuda
    include_1d_diffsfalse

    The tuned-up version of this pack's plain DARE-Ties merger. Where LoRA Multi-Merge (DARE-Ties) drops a flat percentage of each LoRA's small weight changes at random, Enhanced DARE-Ties - also from silveroxides' ComfyUI-ModelUtils - scales the odds of keeping a weight by how big that weight's contribution actually is. Bigger deltas get kept more often, tiny ones get dropped more often, instead of every parameter getting the same coin flip.

    The mechanism, and what changed from plain DARE. Standard DARE picks a flat drop rate and applies it uniformly - every small-magnitude weight has the same chance of getting zeroed, regardless of just how small it is relative to its neighbors. The node's own description of this variant: "Uses dynamic probability masking based on value magnitudes." Instead of one drop rate, you get a masking curve: mask_power (default 2.0, described in its tooltip as "Curve. 2.0 = quadratic") controls how sharply the keep-probability scales with a weight's size - a higher power means small weights get punished harder relative to large ones. min_keep_prob (default 0.01) is a floor under that curve, so nothing hits exactly zero probability of survival - the tooltip calls this out directly as a guard "to prevent explosion," i.e. stopping the masking from being so aggressive in some region that a whole layer effectively collapses. mask_smooth (default 0) blends between hard dropout (0.0, a weight either survives or doesn't) and soft continuous scaling (1.0, weights get proportionally down-weighted rather than binary-dropped). TIES' sign-conflict resolution - trimming and picking the dominant direction when LoRAs disagree - still runs via trim_quantile (default 0.2), same as the plain version.

    Inputs that matter. lora_1 through lora_8 (only lora_1 required) plus matching weight_1-weight_8 (default 1.0 each) are your sources and their contribution levels, gated by lora_count. base_model (default None) reconciles key-naming differences across LoRAs from different trainers - same role as in the plain DARE-Ties node, and worth setting if your LoRAs didn't all come from the same pipeline. mask_power, min_keep_prob, mask_smooth, and trim_quantile are the merge-quality knobs described above. seed (default 42) still matters for reproducibility, since masking involves randomness even with magnitude weighting. output_filename, save_dtype (fp16), and device (cuda) finish it off. One output: output_path.

    Installing it. ComfyUI Manager, search "Model Utility Toolkit" - or cd ComfyUI/custom_nodes && git clone https://github.com/silveroxides/ComfyUI-ModelUtils, restart. No extra dependencies in the README.

    When to reach for this over the plain version. Start with plain LoRA Multi-Merge (DARE-Ties) first - it's fewer knobs, and for most straightforward multi-LoRA merges (a couple of style LoRAs, a character plus a lighting LoRA) flat dropout does the job fine. Come here specifically when flat dropout is either wiping out small-but-meaningful details you wanted to keep, or conversely not being aggressive enough about killing noise in layers dominated by a few large-magnitude changes - magnitude-aware masking is the tool for "the size of the change should influence whether it survives," which flat dropout structurally can't express.

    Where it bites. Same architecture constraint as the plain version - every LoRA needs to target the same base model, since DARE-Ties resolves conflicts between compatible deltas rather than reconciling incompatible ones. With more knobs than the plain node, it's also easier to end up somewhere odd: a very high mask_power combined with a low min_keep_prob can end up dropping almost everything below the largest few weights, so if a merge looks like it lost most of a LoRA's identity, that combination is the first thing to check before assuming the LoRAs themselves don't merge well together.

    CategoryModelUtils/LoRA/Merge

    Inputs (27)

    NameTypeDefaultDescription
    base_modelCOMBONoneOptional reference model to resolve key naming issues across formats. If None, input keys are preserved verbatim.
    lora_countCOMBO2Use the first N LoRA selectors; selectors beyond this count are ignored.
    lora_1COMBOFirst LoRA
    weight_1FLOAT1.00-10–10Scale LoRA 1's represented delta before enhanced DARE-Ties merging; negative values subtract it.
    lora_2COMBONoneOptional LoRA 2; used only when included by LoRA Count.
    weight_2FLOAT1.00-10–10Scale LoRA 2's represented delta before enhanced DARE-Ties merging.
    lora_3COMBONoneOptional LoRA 3; used only when included by LoRA Count.
    weight_3FLOAT1.00-10–10Scale LoRA 3's represented delta before enhanced DARE-Ties merging.
    lora_4COMBONoneOptional LoRA 4; used only when included by LoRA Count.
    weight_4FLOAT1.00-10–10Scale LoRA 4's represented delta before enhanced DARE-Ties merging.
    lora_5COMBONoneOptional LoRA 5; used only when included by LoRA Count.
    weight_5FLOAT1.00-10–10Scale LoRA 5's represented delta before enhanced DARE-Ties merging.
    lora_6COMBONoneOptional LoRA 6; used only when included by LoRA Count.
    weight_6FLOAT1.00-10–10Scale LoRA 6's represented delta before enhanced DARE-Ties merging.
    lora_7COMBONoneOptional LoRA 7; used only when included by LoRA Count.
    weight_7FLOAT1.00-10–10Scale LoRA 7's represented delta before enhanced DARE-Ties merging.
    lora_8COMBONoneOptional LoRA 8; used only when included by LoRA Count.
    weight_8FLOAT1.00-10–10Scale LoRA 8's represented delta before enhanced DARE-Ties merging.
    mask_powerFLOAT2.000.001–10Exponent shaping magnitude-based keep probabilities; larger values favor high-magnitude values more strongly.
    min_keep_probFLOAT0.010–1Lower bound for each value's keep probability, limiting inverse-probability rescaling.
    mask_smoothFLOAT0.000–1Blend between stochastic masking at 0 and smooth probability scaling at 1.
    trim_quantileFLOAT0.200–1Remove the lowest-magnitude fraction before resolving sign conflicts with TIES.
    seedINT420–18446744073709550000Random seed for reproducible enhanced DARE masks.
    output_filenameSTRINGmerged_lora_dare_enhancedOutput filename without extension, written under ComfyUI's LoRA directory.
    save_dtypeCOMBOfp16Requested dtype for generated factors; scalar alpha tensors do not determine factor precision.
    deviceCOMBOcudaDevice for per-target arithmetic; a CUDA OOM retries only the affected target on CPU.
    include_1d_diffsBOOLEANfalseInclude and merge 1D direct-diff tensors as FP32.

    Outputs (1)

    NameTypeDescription
    output_path*