Scale Mask | Akatz
Scale Mask is a strength knob, not a resize — read this before you're disappointed
- mask
- MASK
The name says "Scale Mask," so you'd be forgiven for thinking it resizes your mask. It doesn't. It multiplies the mask's values by a scale_factor between 0 and 1 - which means it can only dim a mask, never stretch it. Think of it as a volume knob for mask intensity rather than a transform.
Why you'd reach for it
In animation and compositing you constantly need to weaken a mask's influence without rebuilding it. A mask that's too aggressive on a region, a feathered selection you want to fade in over frames, a dilation output you want to tame before it hits a KSampler or a blend - AK_ScaleMask gives you a single number to dial that back. It's the mask equivalent of turning down opacity, except it's a clean elementwise multiply on the tensor, so it composes fine with whatever comes next.
How it works
There's genuinely no mechanism beyond scaled_mask = mask * scale_factor. The node accepts a MASK tensor in [B, H, W] or [B, C, H, W] form and validates that it's a tensor before multiplying. Because scale_factor is capped at 1.0, you can't push values past their original level - which is deliberate: mask values live in [0,1], and overshooting to >1 would break masking semantics for most consumers anyway.
Inputs and outputs
- mask (
MASK) - the input mask, any batch size. - scale_factor (
FLOAT, default1.0, range0..1) - the only real control.1.0is a no-op,0.0zeroes the whole mask, and anything between is a proportional dim. - MASK output - same shape as the input, scaled.
Installing the pack
It's part of Akatz Custom Nodes (akatz-ai/ComfyUI-AKatz-Nodes). ComfyUI Manager: search "Akatz" and install, or clone it:
cd ComfyUI/custom_nodes
git clone https://github.com/akatz-ai/ComfyUI-AKatz-Nodes
Restart ComfyUI and it shows up under 💜Akatz Nodes. Dependencies here are just torch (already in ComfyUI); the pack's requirements.txt (numpy, torch, opencv-python, pydub) covers its other nodes. No models to download. The README points to the author's Notion docs and a custom GPT rather than documenting nodes inline.
Gotchas
- It will not change your mask's dimensions. For actual resizing, grab a resize node (from ComfyUI core's mask/image tools or a pack like Impact) - this node is the wrong tool entirely.
- Since it only scales down, you can't use it to "boost" a faint mask back to full strength. Use it to reduce, and if you need to intensify, that's a different operation (thresholding or contrast) elsewhere.
- Small but useful: because it's a pure multiply, you can drive
scale_factorfrom a keyframe schedule in the pack to fade a mask in or out over a batch - that's the classic animation use.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| mask | MASK | — | |
| scale_factor | FLOAT | 1.000–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MASK | MASK | — |