Nodes/ComfyUI-DareMerge/Model Merger (Block/DARE)
ComfyUI Node

Model Merger (Block/DARE)

DARE block merging, tuned per stage

By 54rt1n·Created 3 years ago·Updated about a year ago· 98
Model Merger (Block/DARE)
  • model_a
  • model_b
  • model_mask
  • MODEL
drop_rate0.90
tiessum
rescaleoff
seed1
methodcomfy
iterations1
time1.00
label1.00
input1.00
middle1.00
output1.00
out1.00

Model Merger (Block/DARE) is the DARE-TIES merge with block-level ratio sliders bolted on. If the plain DARE node is "sparsify the delta and hope for the best," this one is "sparsify the delta and tell it which stages of the network to actually touch." It's the version of the flagship merge that most people end up using, because the six sliders give you a steering wheel the plain node lacks.

The mechanism is the same DARE-TIES pipeline as the rest of the family: compute the delta between model B and the base model A, randomly drop drop_rate of it, apply TIES sign-agreement so you don't push weights against the direction A already committed to, and add the survivors back. The block ratios don't change that math - they gate where it's allowed to happen. A block ratio of 1 means "run DARE freely here," and 0 means "leave this stage 100% model A." Set input to 0 and the encoder stage is untouched; the stochastic merge happens everywhere else.

The inputs that matter

  • model_a, model_b - base and injected model. A is what you keep; B is what you're folding in.
  • drop_rate (default 0.9) - fraction of the delta randomly dropped. This is the main dial for "how much of B actually lands."
  • ties - sum (paper method), count, or off. Leave it on sum until you have a reason not to.
  • rescale - the paper's rescaling step. The author ships it defaulted to off because it "yields terrible results for SD." Believe them.
  • seed - the most important knob for comparison. DARE is stochastic; same seed, same merge, different seed, different merge.
  • method - comfy (default) plus lerp/slerp and the exotic interpolation family.
  • iterations - repeat the stochastic pass N times.
  • time / label / input / middle / output / out - the six block ratios. 1 = keep A, 0 = take B. Default all 1, meaning DARE runs across the whole model - drop them toward 0 to protect stages.
  • model_mask (optional) - a parameter-level mask for even finer protection.

The output

A MODEL patch, ready for a KSampler or the Save Checkpoint node (MODEL + CLIP + VAE). Nothing writes to disk on its own, so if you like what you see, save it deliberately.

A sensible first recipe

Start with the pack's own recommended flow: build a Magnitude Masker against a known-good base (model A as the filter target, a plain SD1.5 or SDXL as the base), feed its mask into the optional model_mask, then let DARE work on the un-protected parameters. Keep rescale off, ties on sum, and try a couple of seeds before you judge the merge - the author is explicit that the first random seed is not automatically the best one.

Install and gotchas

Install via ComfyUI Manager (search "DareMerge") or git clone https://github.com/54rt1n/ComfyUI-DareMerge into ComfyUI/custom_nodes and restart. Dependencies: matplotlib, numpy, torch, pillow - no downloads. SD1.5 and SDXL only.

Watch the memory: the merge runs on GPU and the pack deliberately prints peak VRAM usage to the console after each run - that printout is normal and it's your best signal for whether your card is comfortable with the model size you merged.

CategoryDareMerge/unet

Inputs (15)

NameTypeDefaultDescription
model_aMODEL
model_bMODEL
drop_rateFLOAT0.900–1
tiesCOMBOsum3 options: sum, count, off
rescaleCOMBOoff2 options: off, on
seedINT10–99999999999
methodCOMBOcomfy12 options: comfy, lerp, slerp, slice, cyclic, gradient, +6
iterationsINT11–100
timeFLOAT1.000–1
labelFLOAT1.000–1
inputFLOAT1.000–1
middleFLOAT1.000–1
outputFLOAT1.000–1
outFLOAT1.000–1
model_maskoptMODEL_MASK

Outputs (1)

NameTypeDescription
MODELMODEL