Nodes/was-node-suite-comfyui/Mask Floor Region
ComfyUI Node Runs on cloud

Mask Floor Region

Pull out the darkest band of a graded mask

By WASasquatch·Created 3 years ago·Updated about a year ago· 1,812
Mask Floor Region

      This is the mirror image of Mask Ceiling Region, and it's worth reading the README's exact wording carefully because it's a little counterintuitive: Mask Floor Region "returns the lower most pixel values as white (255)." It isn't clamping your mask to a minimum the way "floor" might suggest in a math context - it's doing a selection. It finds the darkest band in a graded mask and promotes that band to full white in the output, while everything above it drops out. In other words: floor picks out the low-confidence end of a gradient and turns it into your new selection.

      Why you'd want the darkest band specifically

      Most of the time you want the confident core of a mask, which is what Ceiling Region gives you. Floor Region is for the opposite ask: you want whatever the mask was least sure about, or the faint periphery a blur left behind, or the background rather than the foreground of a graded map. If you blurred a hard-edged mask and want just the faint halo it left at the edges rather than the strong center, Floor Region is the tool that isolates exactly that band.

      It's a niche pull, but it's the right one when the thing you actually care about is the low-value tail of a gradient rather than its peak.

      How it works

      It scans the mask's pixel values, finds the ones sitting near the bottom of the range, and outputs a mask where that low band is rendered white (255) and everything else is discarded. Same mechanism as Ceiling Region, anchored at the opposite end of the value range.

      The inputs and outputs that matter

      A MASK in, a MASK out - containing only the region that was near-black in the source, now promoted to white. On an already-binary mask (nothing but 0 and 255) there's no gradient tail to extract, so don't expect this node to do much on a mask that never went through a blur or a soft segmentation step in the first place.

      Installing it

      ComfyUI Manager: search "WAS Node Suite," install, restart. Manually:

      cd ComfyUI/custom_nodes
      git clone https://github.com/WASasquatch/was-node-suite-comfyui
      

      install requirements.txt against your ComfyUI Python, restart. No model, no heavy dependency - pixel-value thresholding only.

      Common issues & troubleshooting

      The result is empty or all-white. Check the actual value distribution of your input mask first. If it's already pure binary, Floor Region has no gradient tail to select and the output will look close to a no-op; if the whole mask is uniformly mid-gray with nothing genuinely dark, there may be no low band to promote either.

      "Floor" behaved backwards from what I expected. This is the one to remember: it's not a minimum clamp, it's a selection of the darkest band, and that band is turned white in the output - not left dark. Read the node's output as "here's your low-confidence region, now as a usable selection," not as a value-limiting operation.

      Whole suite won't import. Pack-level. WAS Node Suite has been unmaintained since the author marked it retired in December 2023, and the recurring complaint since is the entire suite throwing "Import Failed" after a ComfyUI update, from a shared pinned dependency clashing with the new version. Reinstall requirements.txt against the correct, embedded Python interpreter and restart - the mask math itself is simple and stable, it's the suite's install that's the fragile part.

      Categoryx

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs