ComfyUI > Nodes > ComfyUI-Image-Filters > Blur Mask (Fast)

ComfyUI Node: Blur Mask (Fast)

Class Name

BlurMaskFast

Category
mask/filters
Author
spacepxl (Account age: 295days)
Extension
ComfyUI-Image-Filters
Latest Updated
2024-06-22
Github Stars
0.08K

How to Install ComfyUI-Image-Filters

Install this extension via the ComfyUI Manager by searching for ComfyUI-Image-Filters
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Image-Filters 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Blur Mask (Fast) Description

Apply fast Gaussian blur to mask images for softening edges and enhancing mask quality using efficient OpenCV algorithm.

Blur Mask (Fast):

The BlurMaskFast node is designed to apply a fast Gaussian blur to mask images, which can be particularly useful in image processing tasks where you need to soften or smooth the edges of a mask. This node leverages the efficient Gaussian blur algorithm provided by OpenCV to ensure quick and effective blurring. By adjusting the blur radius along the x and y axes, you can control the extent of the blurring effect, making it a versatile tool for various artistic and technical applications. The primary goal of this node is to enhance the quality of mask images by reducing harsh edges and creating a more natural transition between masked and unmasked areas.

Blur Mask (Fast) Input Parameters:

masks

This parameter expects the input mask images that you want to blur. The masks should be provided in a format that the node can process, typically as tensors. The masks represent the areas of the image that you want to apply the blur effect to.

radius_x

This integer parameter controls the blur radius along the x-axis. The radius determines the extent of the blurring effect horizontally. A larger radius will result in a more pronounced blur. The minimum value is 0, the maximum value is 1023, and the default value is 1. Adjusting this parameter allows you to fine-tune the horizontal blurring effect to achieve the desired level of smoothness.

radius_y

This integer parameter controls the blur radius along the y-axis. Similar to radius_x, this radius determines the extent of the blurring effect vertically. The minimum value is 0, the maximum value is 1023, and the default value is 1. By adjusting this parameter, you can fine-tune the vertical blurring effect to achieve the desired level of smoothness.

Blur Mask (Fast) Output Parameters:

MASK

The output of this node is the blurred mask image. The blurring effect applied to the input mask helps to soften the edges and create a smoother transition between masked and unmasked areas. This can be particularly useful in various image processing and artistic applications where a more natural look is desired.

Blur Mask (Fast) Usage Tips:

  • To achieve a subtle blurring effect, start with small values for radius_x and radius_y and gradually increase them until you reach the desired level of smoothness.
  • If you need to blur the mask uniformly in all directions, use the same value for both radius_x and radius_y.
  • For more pronounced horizontal or vertical blurring, adjust radius_x and radius_y independently to control the blur effect along each axis.

Blur Mask (Fast) Common Errors and Solutions:

"TypeError: Expected input to be a tensor"

  • Explanation: This error occurs when the input mask is not provided in the expected tensor format.
  • Solution: Ensure that the input mask is correctly formatted as a tensor before passing it to the node.

"ValueError: Radius values must be non-negative"

  • Explanation: This error occurs when the radius_x or radius_y values are set to negative numbers.
  • Solution: Check the values of radius_x and radius_y and ensure they are within the valid range (0 to 1023).

"RuntimeError: OpenCV(4.x.x) error: GaussianBlur failed"

  • Explanation: This error may occur if there is an issue with the OpenCV library or the input mask dimensions.
  • Solution: Verify that OpenCV is correctly installed and that the input mask dimensions are appropriate for the Gaussian blur operation.

Blur Mask (Fast) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Image-Filters
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.