ComfyUI Node: Blur

Class Name

Blur

Category
postprocessing/Filters
Author
EllangoK (Account age: 2833days)
Extension
ComfyUI-post-processing-nodes
Latest Updated
2024-08-09
Github Stars
0.16K

How to Install ComfyUI-post-processing-nodes

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

Blur Description

Apply Gaussian blur effect to images for noise reduction and soft appearance, with adjustable radius and sigma for artistic control.

Blur:

The Blur node is designed to apply a Gaussian blur effect to an image, which is a common technique used to reduce image noise and detail. This node is particularly useful for creating a smooth, soft appearance in your images, which can be beneficial for various artistic effects or pre-processing steps in image analysis. By adjusting the blur radius and sigma, you can control the intensity and spread of the blur, allowing for fine-tuned customization to achieve the desired visual outcome. The main goal of this node is to provide a flexible and efficient way to soften images, enhancing their aesthetic quality or preparing them for further processing.

Blur Input Parameters:

image

This parameter represents the input image that you want to apply the blur effect to. The image should be in the form of a tensor, typically with dimensions corresponding to batch size, height, width, and channels. The image is the primary data that will be processed by the blur algorithm.

blur_radius

The blur radius determines the size of the area around each pixel that will be considered when applying the blur effect. A larger radius results in a more pronounced blur, as more surrounding pixels are averaged together. The minimum value is 0, which means no blur is applied, and there is no explicit maximum value, but very large values may lead to performance issues. The default value is typically set to a moderate level to balance between performance and visual effect.

sigma

Sigma is a parameter that controls the spread of the Gaussian function used in the blur process. It affects how much influence neighboring pixels have on each other. A higher sigma value results in a smoother and more diffused blur. There is no strict minimum or maximum value, but typical values range from 0.1 to 10. The default value is usually set to provide a noticeable but not overwhelming blur effect.

Blur Output Parameters:

IMAGE

The output is the blurred version of the input image. This tensor will have the same dimensions as the input image but with the blur effect applied. The blurred image can be used directly for artistic purposes or as a pre-processed input for further image processing tasks.

Blur Usage Tips:

  • For subtle blurring effects, use a small blur radius (e.g., 1-3) and a low sigma value (e.g., 0.5-1.5).
  • To achieve a strong blur effect, increase both the blur radius and sigma. For example, a blur radius of 5-10 and a sigma of 2-5 can create a significant softening effect.
  • Experiment with different combinations of blur radius and sigma to find the optimal settings for your specific use case, whether it's for artistic enhancement or noise reduction.

Blur Common Errors and Solutions:

"RuntimeError: Expected 4-dimensional input for 4-dimensional weight"

  • Explanation: This error occurs when the input image tensor does not have the expected dimensions (batch size, channels, height, width).
  • Solution: Ensure that your input image tensor is correctly shaped. If your image has only three dimensions, add a batch dimension using image.unsqueeze(0).

"ValueError: kernel size should be a positive integer"

  • Explanation: This error happens when the blur radius is set to a negative value or zero.
  • Solution: Set the blur radius to a positive integer value greater than zero to apply the blur effect.

"CUDA out of memory"

  • Explanation: This error indicates that the GPU does not have enough memory to process the image with the given blur settings.
  • Solution: Reduce the blur radius and sigma values to lower the memory requirements, or process the image on the CPU instead of the GPU.

Blur Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-post-processing-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.