Simple Masker
The starting point for every merge mask
- model
- MODEL_MASK
A mask in ComfyUI-DareMerge is a per-parameter whitelist: it tells the merger which weights it's allowed to change and which to leave alone. DM_SimpleMasker is the most basic way to create one - a MODEL goes in, a MODEL_MASK comes out, and you pick what kind of mask you want from four operations. It's not the most exciting node in the pack, but it's the foundation everything else builds on, and its default behavior trips people up more than it should.
The four operations
The operation dropdown is the whole node, really:
- true (default) - a mask of all-ones. Every parameter is selected. This is the "no-op" mask: plug it into a merge and nothing gets protected.
- false - all-zeros. Nothing selected. The "protect absolutely everything" mask, which is how you freeze a model entirely.
- random - a Bernoulli mask: each parameter is selected with probability
arg_one(0.0–1.0). This is the DARE-style stochastic selection in its rawest form - randomly keep a fraction of the weights. - gaussian - a mask where values follow a gaussian distribution around
arg_one(mean) witharg_twoas the standard deviation, which gives you a soft, graded mask instead of a hard binary one.
seed controls the randomness for the random and gaussian modes, so a fixed seed means a reproducible mask.
How it fits in a workflow
The way you actually use this: start with true (or false) as a blank canvas, then feed the output into Mask Edit or Mask Operations to carve it up - targeting specific layers, flipping sections, or combining it with other masks via union/intersection/difference. The "Simple" in the name is literal: SimpleMasker is the raw material generator, and the interesting stuff happens downstream.
The DARE workflow from the README is the other main use: instead of a magnitude mask (which the Magnitude Masker builds from the deltas between two models), you can use random with an arg_one around 0.9 - randomly keep 90% of parameters, then let the DARE merger handle the rest. It's the "stochastic parameter selection" the DARE paper calls for, exposed as one slider.
The default that will bite you
The operation defaults to true, which means "select everything." If you drop this node into a merge expecting it to protect something, you're getting a passthrough mask - the merge behaves as if the mask isn't there. That's not a bug, but it is the most common misunderstanding, so set the operation deliberately. And remember the pack's merge convention while you're at it: selected parameters get merged, unselected ones don't.
Also worth knowing: masks are dense CPU tensors, and SimpleMasker builds one per parameter across the whole model. It's cheap enough for SD1.5, but on a RAM-limited machine the random/gaussian modes on a big model will make themselves known.
Installing it
Part of the 54rt1n/ComfyUI-DareMerge pack - install the pack once for all ~25 nodes. ComfyUI Manager (search "ComfyUI-DareMerge") is easiest:
cd ComfyUI/custom_nodes
git clone https://github.com/54rt1n/ComfyUI-DareMerge
or clone as above, then restart. Dependencies (matplotlib, numpy, torch, pillow) are standard, and there are no model files to download.
The honest take: on its own, SimpleMasker doesn't do much - a passthrough mask and a fully-protected mask are both a couple of clicks. Its value is as the entry point into DareMerge's masking system, and as the simplest way to get stochastic parameter selection into a DARE merge. Start here, then go play with Mask Edit; that's where the pack earns its keep.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| operation | COMBO | true | 4 options: random, gaussian, true, false |
| arg_one | FLOAT | 0.000–1 | — |
| arg_two | FLOAT | 0.000–1 | — |
| seed | INT | 10–99999999999 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL_MASK | MODEL_MASK | — |