Invert Mask
Flip it, because you always need the other side eventually
- msks_list
- msks
Every regional workflow ends up needing the opposite of the mask it has. You built a mask for the window region, and now you need a mask for everything that isn't the window. Invert Mask is the one-input node that does exactly one thing: 1 - mask, with a clamp to keep the result in [0, 1]. White becomes black, black becomes white, and everything in between flips symmetrically.
There's nothing clever to it, and that's the point. It's the mask equivalent of a light switch - you don't want it to do anything else, because you're going to wire it in the middle of chains that are already doing the interesting work.
The single input, the list behavior
msks_list- a MASK list, fed by wire from the snapshot unpacker, PseudoProcessMaterialPrompts, or any upstream mask node.- Output
msks- the same number of masks, same shapes, all inverted.
Like the other mask utilities in this pack, it's INPUT_IS_LIST, so it eats a whole list at once and returns a whole list. Handles [1, H, W] and batched [B, H, W] masks alike.
Where it earns its place
- Background passes. Take the aggregated region mask from PseudoMaskAggregate, invert it, and you have the "everything else" mask for a background or negative-space pass. This is the classic use and it's worth memorizing as a pattern.
- Fixing polarity at the source. Masks from external tools sometimes arrive inverted relative to what your conditioning node expects - the plugin's "keep this" is your node's "ignore this." One invert node fixes it without rebuilding anything.
- Feeding
invert-less nodes. Several nodes in this pack have aninverttoggle built in (blur, reshape, aggregate) but plenty of third-party mask consumers don't. When you're about to chain PseudoMaskBlur or PseudoMaskReshape after a polarity flip, you can skip their toggle and use this node instead - keeps each step's intent readable.
The honest caveats
- It's a strict
1 - mask, not a threshold. A mask at 0.8 inverts to 0.2; soft masks stay soft. If you want hard black/white, pair it with PseudoMaskClamp at 0/1 or use a threshold elsewhere. - Because it's
INPUT_IS_LIST, don't expect it to accept a single bare mask on a normal socket and return a single value - it's designed for the list-shaped plumbing of this pack. (In practice a one-item list behaves fine.)
Nothing else to configure, nothing to install beyond the pack (git clone https://github.com/Pseudotools/Pseudocomfy into custom_nodes, or Manager → "Pseudocomfy"). It's the least glamorous node in the drawer and one of the most frequently reached for.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| msks_list | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| msks | MASK | — |