Nodes/Allor Plugin/ImageEffectsGrayscale
ComfyUI Node

ImageEffectsGrayscale

Allor's dead-simple grayscale

By Nourepide·Created 3 years ago·Updated 2 years ago· 295
ImageEffectsGrayscale
  • images
  • IMAGE

There's not a lot to say about a grayscale filter, so here's the honest pitch: if you want to strip color out of an image in the middle of a ComfyUI graph, this is the node - one input, one output, no knobs to fiddle with. It's part of the Allor plugin, which is worth knowing about even for this one trivial node because it handles the boring image-ops chores that core ComfyUI leaves you to stitch together yourself.

How it works

Under the hood it's just a channel average: the node takes the mean across the color channels and replicates it back to three channels. That's a standard "luminance-ish" grayscale - it ignores the perceptual weighting of green that a true luminance conversion would use, so a red-and-green scene can come out a touch flatter than you'd get from a fancy conversion. For 99% of purposes (checking contrast, making a moody B&W base, feeding a preprocessor) you won't care.

It runs in tensor space - the pack's whole gimmick is avoiding needless round-trips to PIL - and it processes the whole batch in one shot, so multi-image workflows stay fast.

Inputs and output

  • images - a single IMAGE or a batch. That's the entire input list.
  • Output: an IMAGE in grayscale, ready to wire into an upscaler, a controlnet preprocessor, or back into a composite.

That's the whole node. It takes a list of images and returns the same number, so you can chain it inline without thinking about batch sizes.

Installing it

It ships in the Allor pack, so it's a one-time install for every Allor node you'll ever use:

cd ComfyUI/custom_nodes
git clone https://github.com/Nourepide/ComfyUI-Allor

Restart ComfyUI, or use ComfyUI Manager and search for Allor Plugin. The pack's requirements.txt installs rembg and onnx on first launch - that's the slow part; this node itself needs no models or downloads.

Gotchas

  • Because it averages all channels, a 4-channel RGBA input gets its alpha averaged in too, and the output comes back as three channels. If you're feeding transparent images and need the alpha preserved for compositing, apply grayscale after you've separated or flattened your alpha, not before.
  • Don't expect a one-trick pony to replace a real luminance tool. If you need weighted or channel-specific grayscale, look elsewhere - this is the "good enough, no options" option.

For the other end of the same spectrum, Allor's ImageEffectsSepia and ImageEffectsNegative are the same kind of zero-config utilities.

Categoryimage/effects

Inputs (1)

NameTypeDefaultDescription
imagesIMAGE

Outputs (1)

NameTypeDescription
IMAGEIMAGE