ComfyUI Node

PM Breadcrumbs

Merge the 'meaty' mid-range weights, skip the noise

By larsupb·Created 2 years ago·Updated about a month ago· 75
PM Breadcrumbs
    • MergeMethod
    sign_consensusfalse
    rescale_normdefault
    density0.90
    gamma0.10
    average_weightsfalse

    Model Breadcrumbs is the merge method built on a specific theory of how LoRA weights behave: the extremes are the problem. The tiniest-magnitude weights are noise, and the largest-magnitude ones are outliers that dominate the merge and cause conflicts. The signal you actually want to merge is the "meaty" middle - the mid-range changes. This node prunes both extremes and merges what's left.

    You reach for it when a merge comes out unstable or one LoRA steamrolls the others. DARE attacks interference with random pruning; Breadcrumbs attacks it with informed pruning - it deliberately removes the biggest and smallest changes, keeping the range most likely to represent real, compatible learning.

    How it works

    For each LoRA's task vector (difference from the base), it does two pruning steps. First it removes a gamma fraction of the parameters with the largest absolute magnitudes. Then it removes enough of the smallest magnitudes to hit the target density - specifically max(0, 1 − density − gamma) of the bottom. Take density 0.9 and gamma 0.01: top 1% removed, bottom 9% removed, 90% retained. Take density 0.9 and gamma 0.1 instead: the top 10% alone covers the whole drop, so the bottom pruning goes to zero and you still keep 90%. If gamma is set high enough that gamma >= 1 − density, the largest-magnitude pruning is adjusted to exactly 1 − density and nothing else is dropped. Either way, density is always the fraction you end up keeping. The ties toggle layers TIES sign consensus on top, so surviving weights also have to agree on sign across the models.

    The inputs that matter

    • density - final fraction of weights retained (default 0.9).
    • gamma - fraction of largest-magnitude differences to drop (default 0.1). This is the dial that makes Breadcrumbs Breadcrumbs: too high and you carve out signal, too low and you're just doing TIES.
    • ties - add sign consensus (default off).
    • rescale_norm - how survivors are rescaled (l1, l2, linf, none, or default auto-pick).
    • normalize - weight normalization for contributing models (default off here, unlike some siblings).

    Output is a MergeMethod config for PM LoRA Merger. Needs 2+ LoRAs, and it uses the base-model task-vector framing.

    Installing

    Ships in the LoRA Power-Merger pack. ComfyUI Manager (search "LoRA Power-Merger") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/larsupb/LoRA-Merger-ComfyUI
    cd LoRA-Merger-ComfyUI
    pip install -r requirements.txt
    

    Restart ComfyUI. Dependencies: PyTorch, lxml, mergekit.

    Common issues

    The easy trap is setting gamma high and density high simultaneously - you end up keeping almost everything above the median, which quietly disables the method's whole point. If your result looks like a plain weighted average, check whether gamma is doing anything at all. And like all the task-arithmetic family, mismatched LoRA ranks will fail at the merger - reconcile ranks with PM LoRA Stack Decompose (rSVD) first. The "(Mergekit)" suffix is legacy here: current versions run Breadcrumbs on the pack's own delta-space implementation.

    CategoryLoRA PowerMerge/Task Arithmetic

    Inputs (5)

    NameTypeDefaultDescription
    sign_consensusBOOLEANfalseTIES sign consensus. ON: elect one sign per weight element (majority vote across the LoRAs) and keep only contributions that agree with it — cancels conflicting edits between LoRAs. OFF: plain weighted combine (the '_linear' variant, no sign vote).
    rescale_normCOMBOdefaultRescaling strategy: • default: Auto-select (L1 for methods needing it, none otherwise) • l1: L1 norm preservation (precise, preserves magnitude sum) • l2: L2 norm preservation (precise, preserves Euclidean norm) • linf: L-infinity norm (preserves max absolute value, prevents amplification) • none: No rescaling (may reduce merge strength)
    densityFLOAT0.900–1Fraction of weights in differences from the base model to retain.
    gammaFLOAT0.100–1Fraction of largest magnitude differences to remove
    average_weightsBOOLEANfalseON: divide by the per-element sum of contributing weights — a weighted AVERAGE, so per-LoRA strengths act as ratios (two LoRAs at strength 1.0 each land at ~50%). OFF: additive SUM, so strengths act as gains and stacked LoRAs keep full magnitude (matches ComfyUI's native LoRA stacking, the default). Turn ON only to blend/interpolate LoRAs.

    Outputs (1)

    NameTypeDescription
    MergeMethodMergeMethod