ComfyUI  >  Nodes  >  Bmad Nodes >  MaskOuterBlur

ComfyUI Node: MaskOuterBlur

Class Name

MaskOuterBlur

Category
Bmad/CV/Misc
Author
bmad4ever (Account age: 3591 days)
Extension
Bmad Nodes
Latest Updated
8/2/2024
Github Stars
0.1K

How to Install Bmad Nodes

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

MaskOuterBlur Description

Specialized node for blurring outer image regions based on a mask, ideal for creating smooth transitions and enhancing visual depth.

MaskOuterBlur:

MaskOuterBlur is a specialized node designed to apply a blurring effect to the outer regions of an image based on a given mask. This node is particularly useful for AI artists who want to create a smooth transition between the focused and blurred areas of an image, enhancing the visual appeal and depth. The primary goal of MaskOuterBlur is to selectively blur parts of an image while preserving the details in the masked regions, allowing for creative control over the final output. By leveraging both CPU and GPU processing capabilities, this node ensures efficient performance and high-quality results.

MaskOuterBlur Input Parameters:

src

The source image to which the blurring effect will be applied. This parameter is crucial as it defines the base image that will undergo the selective blurring process. The image should be in a compatible format, typically a NumPy array or similar.

mask

A binary mask that indicates the regions of the image to be preserved (non-blurred) and the regions to be blurred. Pixels with a value of 0 in the mask will be blurred, while pixels with a value greater than 0 will remain sharp. This mask allows for precise control over which parts of the image are affected by the blur.

kernel

The convolution kernel used for the blurring process. This parameter defines the shape and intensity of the blur effect. The kernel should be a 2D array with positive values that sum up to 1, typically generated using a Gaussian function.

kernel_s

The size of the convolution kernel. This parameter determines the extent of the blurring effect. Larger kernel sizes result in a more pronounced blur, while smaller sizes produce a subtler effect. The value should be an odd integer to ensure a symmetric kernel.

w

The width of the source image. This parameter is used to correctly index and process the image data during the blurring operation. It should match the actual width of the src image.

h

The height of the source image. Similar to the width parameter, this is used to correctly index and process the image data. It should match the actual height of the src image.

MaskOuterBlur Output Parameters:

out

The output image with the applied blurring effect. This image will have the same dimensions as the source image but with the specified regions blurred according to the mask. The output is typically a NumPy array or similar format, ready for further processing or display.

MaskOuterBlur Usage Tips:

  • Ensure that the mask accurately represents the regions you want to preserve and blur. A well-defined mask will result in a more visually appealing transition between sharp and blurred areas.
  • Experiment with different kernel sizes and shapes to achieve the desired blurring effect. Gaussian kernels are commonly used for a natural-looking blur.
  • Utilize the GPU processing option for larger images or more complex masks to significantly speed up the blurring process.

MaskOuterBlur Common Errors and Solutions:

"IndexError: index out of bounds"

  • Explanation: This error occurs when the kernel size is too large for the given image dimensions, causing the indexing to go out of bounds.
  • Solution: Ensure that the kernel size is appropriate for the image dimensions. Reduce the kernel size or use padding to avoid this error.

"ValueError: mask and src must have the same dimensions"

  • Explanation: This error happens when the mask and source image dimensions do not match, leading to a mismatch during processing.
  • Solution: Verify that the mask and source image have the same width and height. Resize the mask or source image if necessary to ensure they match.

"TypeError: unsupported operand type(s)"

  • Explanation: This error can occur if the input parameters are not in the expected format, such as passing a list instead of a NumPy array.
  • Solution: Ensure that all input parameters are in the correct format. Convert lists to NumPy arrays or use appropriate data structures as required by the node.

MaskOuterBlur Related Nodes

Go back to the extension to check out more related nodes.
Bmad Nodes
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.