〽️ Image Ops Invert
The one-trick invert node with a hidden second trick — alpha inversion
- image
- mask
- image
- mask
ImageOps Invert does what it says: flips every color to its complement - black to white, red to cyan, the whole palette inverted. It's the least surprising node in the ComfyUI-Majoor-ImageOps pack, and mostly that's fine, because sometimes you just need an inversion and you don't want to think about it. But it has one feature that makes it worth knowing about rather than reaching for a plain math node: separate control over the alpha channel.
The controls
invert_alpha- inverts the alpha channel too, but only when the input image actually has four channels (RGBA). For a plain RGB image, nothing happens. This is the differentiator: most "invert" nodes in ComfyUI are color-only, and this one lets you flip the transparency matte without touching the colors - or flip both together. If you've ever needed the opposite of a cutout (the area outside the subject, rather than the subject), this is a one-click way to get it.invert_mask- flips the output mask.bypass- pass the image through untouched for A/B comparison.
Inputs are image and an optional mask (with invert_mask). Outputs are image and mask. Batch-first like everything in the pack - a whole clip inverts in one pass.
Where you'll use it
- Creative looks - full inversion is a stylized trip for certain images, and it's a classic way to check a composition or see hidden channel detail.
- Matte math - combined with
invert_alpha, you get "everything except the cutout," which slots straight into a merge or keyer workflow. - Debugging - inverting a suspicious image instantly shows whether the problem is in the shadows or the highlights, since the tonal relationship flips.
Install
ComfyUI Manager (search "ComfyUI-Majoor-ImageOps"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/MajoorWaldi/ComfyUI-Majoor-ImageOps
Restart and hard-refresh the browser (Ctrl+F5 / Cmd+Shift+R). No models, no extra dependencies.
The honest take
This is a thin node, and it's fine that it's thin - inversion is a primitive. You'll use it occasionally, forget it exists, then rediscover it when you need a quick negative. The only real gotcha is the invert_alpha one: it silently does nothing on 3-channel images, which has sent more than one person hunting for a bug that isn't there. Feed it an RGBA image (a PNG with transparency, or anything carrying a real alpha) and it springs to life. If your invert isn't "inverting enough," that's the first thing to check.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| bypass | BOOLEAN | false | — |
| invert_mask | BOOLEAN | false | — |
| invert_alpha | BOOLEAN | false | Also invert the alpha channel (only applies to RGBA images). |
| imageopt | IMAGE,VIDEO | Images/Video input. Accepts IMAGE batches and VIDEO frame sources. | |
| maskopt | MASK | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |