ComfyUI Node

MX_Solarize

The one-input invert that makes highlights weird on purpose

By Intersection98·Created 2 years ago·Updated 2 years ago· 13
MX_Solarize
  • image
  • IMAGE
threshold0.50

Solarize is the node you reach for when a render comes out too clean and you want it to look a little cursed on purpose. It's the classic darkroom Sabattier effect: pixels brighter than a threshold get inverted, pixels darker than it stay put. Highlights suddenly flip to dark, mid-tones take on a metallic sheen, and you get that high-contrast "photographic accident" look that screams analog in one pass.

It lives in the MX pack (Intersection98/ComfyUI-MX-post-processing-nodes), a grab-bag of post-processing nodes that slot in after your VAE decode and before a PreviewImage. Solarize is one of the simplest things in the pack, and that's its whole appeal: no noise knobs, no color wheels, just a threshold and a result.

How it works

The implementation is essentially one line of tensor math:

torch.where(image > threshold, 1 - image, image)

Every pixel channel above threshold gets flipped to its inverse (1 - x), everything else passes through untouched. It applies per-channel, so it also does subtle things to hue as the R, G, and B values cross the line at different amounts. That's why a solarized image looks color-shifted rather than just "bright things dark."

The one input that matters

  • image - anything shaped like an IMAGE tensor straight off a VAE decode.
  • threshold - a float from 0 to 1, default 0.5. This is the whole game. At 0.5, roughly the upper half of the brightness range inverts. Drop it toward 0.1 and nearly everything inverts - the image goes mostly negative with a few dark pixels surviving. Crank it toward 0.9 and only the very brightest speculars flip, which reads more like a soft, weird highlight treatment than full solarization.

The output is a single IMAGE of the same shape as the input, so you can chain it straight into a save node, a VAE encode for re-sampling, or another MX effect.

Install

The pack is a standard custom-node clone. Either grab it from ComfyUI Manager (search MX or ComfyUI-MX-post-processing-nodes) or:

cd ComfyUI/custom_nodes
git clone https://github.com/Intersection98/ComfyUI_MX_post_processing-nodes
cd ComfyUI_MX_post_processing-nodes
pip install -r requirements.txt

Then restart ComfyUI. No model files, no weights, no API key - the dependencies are just the usual torch/numpy/Pillow stack plus opencv-python, which most installs already have because half the ecosystem needs it. You'll see it under postprocessing/Color Adjustments in the node menu.

Where people get burned

The only real trap is the usual one with this whole pack: it's a collection of bare post-processing utilities, so the README has almost no per-node documentation. If a solarized result looks nothing like you expected, it's not broken - threshold is just doing exactly what it says, and solarization genuinely looks bizarre on some images. Try it on a portrait with strong highlights and a bright sky; those are where it reads best. And if you're after the look for photorealism cleanup rather than an effect, this isn't it - that's the color-grading nodes' job, not solarization's.

Categorypostprocessing/Color Adjustments

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
thresholdFLOAT0.500–1

Outputs (1)

NameTypeDescription
IMAGEIMAGE