ComfyUI > Nodes > ImageProcessing > Unsharp Mask

ComfyUI Node: Unsharp Mask

Class Name

UnsharpMask

Category
ImageProcessing
Author
bvhari (Account age: 1432days)
Extension
ImageProcessing
Latest Updated
2024-08-03
Github Stars
0.02K

How to Install ImageProcessing

Install this extension via the ComfyUI Manager by searching for ImageProcessing
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ImageProcessing 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

Unsharp Mask Description

Enhance image sharpness by emphasizing edges and fine details through unsharp masking technique.

Unsharp Mask:

The UnsharpMask node is a powerful tool in image processing designed to enhance the sharpness of images by emphasizing edges and fine details. This node operates by applying a technique known as unsharp masking, which involves blurring the original image and then subtracting this blurred version from the original to create a mask that highlights the edges. The result is an image with enhanced contrast and clarity, making it particularly useful for improving the visual quality of images that may appear soft or out of focus. By adjusting the parameters of the unsharp mask, you can control the degree of sharpening applied, allowing for subtle enhancements or more pronounced effects depending on your artistic needs. This node is essential for AI artists looking to refine their images and bring out intricate details that might otherwise be overlooked.

Unsharp Mask Input Parameters:

images

This parameter represents the input image or images that you want to process. The node expects images in a specific format, typically as tensors, which are then transformed to enhance their sharpness. The images are moved to a different dimension order to facilitate processing, ensuring compatibility with the underlying operations.

kernel_size

The kernel_size parameter determines the size of the kernel used in the blurring process, which is a crucial step in the unsharp masking technique. A larger kernel size results in a more pronounced blur, which can lead to more significant edge enhancement when subtracted from the original image. The value of kernel_size can range from 1 to 20, with a default value of 3. Adjusting this parameter allows you to control the extent of the sharpening effect, with larger values typically resulting in more dramatic enhancements.

sigma

The sigma parameter controls the standard deviation of the Gaussian blur applied during the unsharp masking process. It affects the spread of the blur, with higher values leading to a softer blur and, consequently, a more subtle sharpening effect. The sigma value can range from 0.0 to 10.0, with a default of 1.25. By fine-tuning this parameter, you can achieve the desired level of detail enhancement, balancing between subtlety and intensity.

Unsharp Mask Output Parameters:

IMAGE

The output of the UnsharpMask node is the processed image, which has undergone sharpening to enhance its details and contrast. This output image retains the original dimensions and format but with improved clarity and definition, making it more visually appealing. The sharpening effect is applied uniformly across the image, ensuring that all areas benefit from the enhancement, resulting in a more polished and professional appearance.

Unsharp Mask Usage Tips:

  • Experiment with different kernel_size and sigma values to find the perfect balance for your image. Smaller values can provide subtle enhancements, while larger values can create more dramatic effects.
  • Use the UnsharpMask node as a final touch in your image processing workflow to ensure that your images have the desired level of sharpness and detail before finalizing them.

Unsharp Mask Common Errors and Solutions:

"Invalid image format"

  • Explanation: This error occurs when the input image is not in the expected format or dimension order.
  • Solution: Ensure that your images are properly formatted as tensors and moved to the correct dimension order before processing.

"Kernel size out of range"

  • Explanation: The kernel_size parameter is set outside the allowable range of 1 to 20.
  • Solution: Adjust the kernel_size value to fall within the specified range to avoid this error.

"Sigma value out of range"

  • Explanation: The sigma parameter is set outside the allowable range of 0.0 to 10.0.
  • Solution: Ensure that the sigma value is within the specified range to prevent this error.

Unsharp Mask Related Nodes

Go back to the extension to check out more related nodes.
ImageProcessing
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 Playground, enabling artists to harness the latest AI tools to create incredible art.