ComfyUI  >  Nodes  >  ComfyUI-Image-Filters >  Bilateral Filter Image

ComfyUI Node: Bilateral Filter Image

Class Name

BilateralFilterImage

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

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

Bilateral Filter Image Description

Enhance images with sharpness and detail preservation using bilateral filter for noise reduction and edge preservation.

Bilateral Filter Image:

The BilateralFilterImage node is designed to enhance your images by applying a bilateral filter, which is particularly effective in reducing noise while preserving edges. This filter is highly beneficial for tasks that require maintaining the sharpness and details of an image, such as portrait retouching or artistic effects. By smoothing out the noise without blurring the edges, the bilateral filter ensures that the important features of your image remain intact, providing a cleaner and more visually appealing result.

Bilateral Filter Image Input Parameters:

images

This parameter accepts the image(s) you want to process. The input should be in the form of an image tensor. The node will apply the bilateral filter to each image in the batch.

size

This integer parameter controls the diameter of the pixel neighborhood used during filtering. It determines the extent of the area around each pixel that will be considered for the filtering process. The value ranges from 1 to 64, with a default value of 8. A larger size will result in more smoothing but may also blur fine details.

sigma_color

This float parameter defines the filter's sensitivity to color differences. It controls how much the filter considers the color intensity differences between pixels. The value ranges from 0.01 to 1000.0, with a default value of 0.5. A higher sigma_color value will result in more significant smoothing of color variations, which can help reduce color noise.

sigma_space

This float parameter specifies the filter's sensitivity to spatial differences. It determines how much the filter considers the distance between pixels. The value ranges from 0.01 to 1000.0, with a default value of 100.0. A higher sigma_space value will result in more extensive smoothing over larger areas, which can help reduce spatial noise.

Bilateral Filter Image Output Parameters:

IMAGE

The output is the filtered image tensor. The bilateral filter is applied to each input image, resulting in a cleaner image with reduced noise while preserving edges and important details. This output can be used for further processing or as a final result for display or analysis.

Bilateral Filter Image Usage Tips:

  • For portraits or images with significant noise, start with the default values and adjust the sigma_color and sigma_space parameters to find the right balance between noise reduction and detail preservation.
  • If you notice that fine details are being lost, try reducing the size parameter to focus the filter on smaller neighborhoods.
  • Experiment with different sigma_color values to see how it affects the color smoothing, especially in images with a lot of color variations.

Bilateral Filter Image Common Errors and Solutions:

TypeError: Expected input to be a tensor

  • Explanation: This error occurs when the input provided is not in the expected tensor format.
  • Solution: Ensure that the input images are correctly formatted as tensors before passing them to the node.

ValueError: Size parameter out of range

  • Explanation: This error occurs when the size parameter is set outside the allowed range of 1 to 64. - Solution: Adjust the size parameter to be within the valid range.

ValueError: Sigma parameters out of range

  • Explanation: This error occurs when either the sigma_color or sigma_space parameters are set outside their allowed ranges.
  • Solution: Ensure that sigma_color is between 0.01 and 1000.0, and sigma_space is between 0.01 and 1000.0. Adjust the values accordingly.

Bilateral Filter Image 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.