To Grayscale
Drop an image to black-and-white
- src_image
- image
This one's about as simple as a ComfyUI node gets: feed it an image, get back the same image with the color pulled out. No sliders, no threshold, no fuss. It converts to luminance grayscale and hands you an IMAGE (still a 3-channel RGB tensor, just gray) that flows on to anything else in your graph.
Why would you want it? A few honest reasons. You're building a ControlNet-ish preprocessing step and want a neutral base. You're feeding a downstream node that behaves better on desaturated input. Or you just want a black-and-white version of a render without opening Photoshop. It's plumbing, and plumbing is most of what a workflow actually is.
It ships inside ComfyUI_Mira, which is mirabarukaso's personal grab-bag of quality-of-life nodes - the author literally describes the pack as things built "to improve all those custom nodes I feel not comfortable in my workflow." To Grayscale is one of a little family of image-adjustment nodes (Contrast, Sharpness, Brightness, Saturation, HUE, Gamma, Tone Curve, RGB Channel) that are all designed to daisy-chain: the output of one plugs straight into the src_image of the next, so you can stack a whole mini color-correction pipeline out of these small nodes.
How it works
It takes the RGB image and collapses the three channels to a single brightness value per pixel, then writes that value back across all three channels so the result is still a valid IMAGE the rest of ComfyUI understands. That's it - a straight desaturation, not a stylized "moody B&W" filter. If you want tonal drama on top, chain a Tone Curve or Adjust Contrast node after it.
The inputs and outputs that matter
There's really only one of each:
- src_image - the image you want to desaturate.
- image (output) - the grayscale result, wired into your next node (a save, a preview, another Mira adjustment, whatever).
No numeric parameter to tune. If you find yourself wanting a partial desaturation, that's the Adjust Saturation node's job (set its level below 1), not this one - this node is all-or-nothing gray.
Installing it
Through ComfyUI Manager: open the Custom Nodes Manager, search ComfyUI_Mira, click Install, and restart. Or clone it by hand:
cd ComfyUI/custom_nodes && git clone https://github.com/mirabarukaso/ComfyUI_Mira.git
then restart ComfyUI. If it throws an error while loading, run pip install -r requirements.txt inside the ComfyUI_Mira folder and restart again. The node lands under the Mira/Util/Image menu.
Common issues
There's not much to break here. The two things worth knowing:
- The output is still 3-channel. Don't expect a single-channel MASK out of this - it's a gray IMAGE. If a downstream node wants a mask, convert it properly (image-to-mask), don't assume gray equals mask.
- It's part of a personal pack. Mira is one developer's toolkit, and node names and menu placement have shifted across updates. If you load an old workflow and this node comes up red, it usually means the pack updated or isn't installed - reinstall through Manager and it'll reconnect. The behavior itself is trivial enough that it's unlikely to change.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| src_image | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |