ComfyUI > Nodes > ComfyUI-Purz > Image to Black & White (Purz)

ComfyUI Node: Image to Black & White (Purz)

Class Name

PurzImageToBlackWhite

Category
Purz/Image/Color
Author
purzbeats (Account age: 1545days)
Extension
ComfyUI-Purz
Latest Updated
2026-02-06
Github Stars
0.02K

How to Install ComfyUI-Purz

Install this extension via the ComfyUI Manager by searching for ComfyUI-Purz
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Purz in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Image to Black & White (Purz) Description

Transforms colored images to black and white using a luminance-based RGB formula for natural results.

Image to Black & White (Purz):

The PurzImageToBlackWhite node is designed to transform colored images into black and white using a luminance-based approach. This node leverages the luminance formula, which is a weighted sum of the RGB color channels, to convert images into grayscale. The formula used is Y = 0.299*R + 0.587*G + 0.114*B, where Y represents the luminance value. This method ensures that the perceived brightness of the image is preserved, resulting in a more natural and visually appealing black and white conversion. By focusing on luminance, the node effectively captures the essence of the original image while stripping away color, making it ideal for applications where color information is unnecessary or distracting. This node is particularly useful for artists and designers who want to explore the tonal range of their images or create classic black and white effects.

Image to Black & White (Purz) Input Parameters:

image

The image parameter is the primary input for the PurzImageToBlackWhite node. It accepts a batch of images in the format [batch, height, width, channels], where each image is expected to be in RGB format. This parameter is crucial as it provides the node with the data it needs to perform the black and white conversion. The input image's color information is used to calculate the luminance, which is then used to generate the grayscale version of the image. There are no specific minimum or maximum values for this parameter, but the images should be in a compatible format for processing.

Image to Black & White (Purz) Output Parameters:

image

The image output parameter provides the resulting black and white images after processing. Each image in the batch is converted to grayscale using the luminance formula, and the output is an RGB image where all three color channels have the same value, representing the calculated luminance. This ensures that the output maintains the same dimensions and format as the input, making it easy to integrate into workflows that require consistent image formats. The output is particularly valuable for artists looking to analyze or utilize the tonal qualities of their images without the influence of color.

Image to Black & White (Purz) Usage Tips:

  • To achieve the best results, ensure that the input images are well-lit and have a good range of colors, as this will enhance the contrast and detail in the black and white conversion.
  • Use this node when you want to focus on the composition and structure of an image without the distraction of color, such as in artistic photography or design projects.

Image to Black & White (Purz) Common Errors and Solutions:

Image format not supported

  • Explanation: This error occurs when the input image is not in the expected RGB format or the batch dimensions are incorrect.
  • Solution: Ensure that your input images are in RGB format and follow the [batch, height, width, channels] structure. Convert images to the correct format if necessary before processing.

Tensor shape mismatch

  • Explanation: This error arises when the input tensor does not match the expected shape, possibly due to incorrect batch size or channel count.
  • Solution: Verify that the input tensor has the correct dimensions, with a batch size greater than zero and three channels for RGB. Adjust the input data accordingly.

Image to Black & White (Purz) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Purz
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Image to Black & White (Purz)