Arbitrary Mask Regions
An undocumented mask-region filter in Salt's masking toolkit
- masks
- MASKS
Honest disclosure up front: the repo's own naming has a typo ("Arbitary"), and neither the pack's README nor the node itself documents exactly what algorithm sits behind Arbitrary Mask Regions. So this one gets covered at the schema level rather than with confident claims about internals - take the following as "here's what you can verify by using it," not "here's how it works under the hood."
How it works
What's knowable: it takes a mask, a size, and a threshold, and returns a re-processed mask. It sits in the same SALT/Masking/Filter category as the adaptive-threshold and ceiling filters covered elsewhere in this pack, which is the strongest signal available - treat it as another region-reshaping tool in that same toolkit, not something fundamentally different in kind.
Why call it out honestly instead of guessing a mechanism and presenting it as fact: this pack's README is a single paragraph plus a handful of links, with no per-node documentation at all, and the class name itself carries a typo the maintainers never fixed. That's a real signal about how much scrutiny this particular node has gotten, both from its own authors and from the community - it's the kind of node that exists because someone needed it once, not one with years of forum threads clarifying edge cases. Better to say so plainly than to dress up a guess as documentation.
The inputs and outputs that matter
masks(required, MASK).size(required, default 256, 1–4096) - bounded like a pixel dimension rather than a percentage or a count, so it most plausibly governs the scale or working resolution the operation applies internally.threshold(required, default 128, 0–255) - a standard 8-bit mask cutoff, the same range you'd use in any binarization step (128 meaning "half brightness or above counts").
Output is MASKS.
How to install it
ComfyUI Manager: search SaltAI-Open-Resources or SaltAI, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/get-salt-AI/SaltAI
then restart. No model download; likely OpenCV-backed given the rest of this filter family, so cv2 should already be present if the sibling mask nodes are working for you.
Common issues & troubleshooting
Because there's no independent write-up of this node's exact behavior anywhere - not the README, not the community - the honest and most useful troubleshooting step is comparative rather than theoretical: run your mask through this node alongside the better-documented siblings (adaptive threshold, ceiling, contour extraction) and see which one actually produces the shape you want. Don't assume this is the "right" node for a given mask problem just because it happens to be in the list; verify it against alternatives you can reason about more confidently.
If the output looks identical to your input regardless of what you set size or threshold to, that's worth testing on a mask with more gradient/noise in it first - a clean, already-binary mask may simply have nothing for this filter to visibly change.
Practical takeaway: unless you already have a reason to reach for this specific node, start with the better-documented siblings instead. SaltMaskAdaptiveThresholdingRegion and SaltMaskCeilingRegion cover the two most common "clean up a soft mask" use cases with parameters you can actually reason about, and you'll get there faster than reverse-engineering this one by trial and error.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| masks | MASK | — | |
| size | INT | 2561–4096 | — |
| threshold | INT | 1280–255 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MASKS | MASK | — |