Nodes/ComfyUI Essentials/πŸ”§ Image Posterize
ComfyUI Node Runs on cloud

πŸ”§ Image Posterize

Threshold an image down to hard, high-contrast tones

By cubiqΒ·Created 3 years agoΒ·Updated about a year agoΒ· 1,152
πŸ”§ Image Posterize
  • image
  • IMAGE
β—„threshold0.50β–Ί

ImagePosterize takes an image and crushes its smooth gradients into hard, flat regions based on a threshold. Think of it as the "cut everything into black-or-bright" filter - it turns soft tonal transitions into a stark, graphic look. It's the kind of thing you reach for when you want a stylized poster effect, a high-contrast stencil, or a clean binary-ish input for something downstream that wants hard edges rather than photographic subtlety.

It's from ComfyUI Essentials by cubiq (Matteo Spinelli, the ComfyUI_IPAdapter_plus author). The pack collects a bunch of these small image operations that ComfyUI core never bothered to ship.

How it works

The node compares each pixel against the threshold you set and pushes it to one side or the other, collapsing the range of tones down to a hard split. The single threshold control decides where that cut happens - low thresholds keep more of the image "on," high thresholds keep only the brightest areas. The output is a flat, poster-like image with the midtones gone.

The inputs and outputs that matter

Refreshingly, there are only two things here:

  • image (IMAGE) - the input.
  • threshold (FLOAT, 0–1, default 0.5) - the cut point, and the only knob that matters. 0.5 splits down the middle; slide it down to keep more detail lit, up to keep only highlights. This is a "watch the preview and nudge" parameter - the right value depends entirely on the image.

Output: a single IMAGE.

How to install it

ComfyUI Manager: search ComfyUI Essentials, install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/cubiq/ComfyUI_essentials
pip install -r ComfyUI_essentials/requirements.txt

then restart. No models.

Common issues & troubleshooting

The result is almost all black (or all white). That's the threshold sitting too high (or too low) for this particular image. There's no universal value - a dark photo and a bright one need very different cut points. Preview and adjust; it's a one-slider node, so this is quick.

I wanted smooth banding, not a hard cut. With a single threshold this node leans toward a stark, high-contrast split rather than a gentle multi-level posterization. If you were expecting classic "reduce to N color bands" behavior, this is the more aggressive cousin of that - great for graphic effects, less so for subtle stylizing.

I'm using it as a mask. The hard-edged output can make a decent quick mask or a ControlNet-style hard-edge input, but it emits an image, not a MASK type - convert downstream if that's what you need.

Missing after a ComfyUI update. Essentials is maintenance-only as of April 2025 and pack nodes have broken against newer builds. Update through Manager; roll ComfyUI back if it's genuinely incompatible.

Categoryessentials/image processing

Inputs (2)

NameTypeDefaultDescription
imageIMAGEβ€”
thresholdFLOAT0.500–1β€”

Outputs (1)

NameTypeDescription
IMAGEIMAGEβ€”