Nodes/ComfyUI-Advanced-ControlNet/Scaled Soft Masked Weights πŸ›‚πŸ…πŸ…’πŸ…
ComfyUI Node Runs on cloud

Scaled Soft Masked Weights πŸ›‚πŸ…πŸ…’πŸ…

Soft Weights, but region-by-region via a mask

By KosinkadinkΒ·Created 3 years agoΒ·Updated 8 days agoΒ· 993
Scaled Soft Masked Weights πŸ›‚πŸ…πŸ…’πŸ…
  • mask
  • cn_extras
  • CN_WEIGHTS
  • TK_SHORTCUT
β—„min_base_multiplier0.000β–Ί
β—„max_base_multiplier1.000β–Ί
β—„uncond_multiplier1.00β–Ί

The pack's "Soft Weights" nodes replicate Auto1111's famous "My prompt is more important" ControlNet feature - instead of one flat strength number, the ControlNet's influence gets a curve across its internal layers, tapering off so the prompt has more room to win where it matters. The two other Soft Weights nodes in this pack (SoftControlNetWeights, SoftT2IAdapterWeights) hardcode that curve to a fixed number of sliders matching one specific architecture. This one doesn't: it's the universal variant, computing the curve at runtime so it works whatever ControlNet you loaded, and - the "masked" part - it lets a mask decide where in the image that softness applies, instead of applying the same curve everywhere uniformly.

How it works

Where SoftControlNetWeights gives you thirteen fixed weight sliders (one per SD1.5/SDXL ControlNet block) and SoftT2IAdapterWeights gives you four (matching a T2I-Adapter's shallower structure), this node sidesteps the "how many layers does my model actually have" question entirely. You give it a min_base_multiplier and max_base_multiplier instead - the floor and ceiling of the soft-weight range - and a mask. The mask values get scaled onto that range and folded into the standard soft-weight decay curve, so regions the mask marks strongly sit closer to max_base_multiplier and weaker regions sit closer to min_base_multiplier. In effect: you get regional control over how "soft" (prompt-favoring) versus "hard" (structure-favoring) the ControlNet is, rather than one global setting for the whole image.

That's a genuinely different tool from the other two Soft Weights nodes - reach for this one specifically when you want, say, ControlNet holding tight to structure in the background of a shot while the prompt has more freedom over a masked foreground subject.

The inputs and outputs that matter

  • mask (required) - defines where on the canvas the multiplier ranges apply. This is the input that makes the node's whole premise work; without a meaningful mask, you're better off with a plain Soft Weights node.
  • min_base_multiplier / max_base_multiplier (0–1 each, default 0 and 1) - the range the mask gets scaled into. Narrowing this range flattens the difference between masked and unmasked regions; the full 0–1 range gives you the widest contrast.
  • uncond_multiplier (optional, default 1.0) - this is the "ControlNet is more important" side of the same feature pair. Setting it to 0.0 reproduces Auto1111's behavior exactly; values between 0 and 1 give you a granular in-between the original extension never offered.
  • cn_extras (optional, CN_WEIGHTS_EXTRAS) - a side channel for model-specific extras. The one documented use in the README is Anima LLLite's inpainting variant: pass its source mask through an Anima LLLite Extras node into here.

Outputs: CN_WEIGHTS - plug into a Timestep Keyframe's cn_weights input (or Apply Advanced ControlNet's weights_override if you want this schedule locked in for every timestep). TK_SHORTCUT - a convenience output that packages these weights directly as a ready-made Timestep Keyframe, so if you don't need any other Timestep Keyframe features you can skip building one separately and wire this straight where a TIMESTEP_KEYFRAME is expected.

How to install it

Through ComfyUI Manager: search "ComfyUI-Advanced-ControlNet", install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet

then restart. No model downloads - weights nodes are pure math on top of whatever ControlNet you've already loaded.

Common issues & troubleshooting

"weight types are compatible" error at sample time. Despite being the "universal" variant, the weights it produces still have to make sense for the ControlNet architecture you loaded. If you get a compatibility error naming specific weight types, that's the loaded ControlNet telling you what it expects - it isn't a bug in this node.

No visible effect. Check your mask actually has meaningful contrast - a flat or near-empty mask means min_base_multiplier and max_base_multiplier barely differ across the image, which collapses this back down to a plain global Soft Weights curve. Also confirm the mask's resolution matches (or at least corresponds sensibly to) your latent, since a mismatched mask tends to get silently resized rather than erroring.

Mask feels "backwards." Since it's a min/max range rather than a simple multiply, a mask you expect to reduce ControlNet strength somewhere can end up doing the opposite if min_base_multiplier is set higher than intuition suggests. Start from the defaults (0 and 1) and narrow the range only once you've confirmed the direction is right.

CategoryAdv-ControlNet πŸ›‚πŸ…πŸ…’πŸ…/weights

Inputs (5)

NameTypeDefaultDescription
maskMASKβ€”
min_base_multiplierFLOAT0.0000–1β€”
max_base_multiplierFLOAT1.0000–1β€”
uncond_multiplieroptFLOAT1.000–1β€”
cn_extrasoptCN_WEIGHTS_EXTRASβ€”

Outputs (2)

NameTypeDescription
CN_WEIGHTSCONTROL_NET_WEIGHTSβ€”
TK_SHORTCUTTIMESTEP_KEYFRAMEβ€”