Visit ComfyUI Online for ready-to-use ComfyUI environment
Powerful image processing tool for noise reduction while preserving edges using bilateral filter based on spatial and radiometric similarity.
The BilateralFilter node is a powerful tool in image processing that helps in smoothing images while preserving edges, making it ideal for tasks where you want to reduce noise without losing important details. This node applies a bilateral filter, which is a non-linear, edge-preserving, and noise-reducing smoothing filter. It works by averaging the pixels based on both their spatial closeness and their radiometric similarity, meaning it considers both the distance between pixels and the difference in their color values. This makes it particularly useful for enhancing images where you want to maintain sharp edges, such as in portrait photography or when preparing images for further processing in AI art generation.
This parameter represents the input image or images that you want to process using the bilateral filter. The images should be in a format compatible with the node, typically as tensors, and they are the primary data on which the filter will be applied.
The kernel_size
parameter determines the size of the filter kernel used in the bilateral filtering process. It affects the area around each pixel that is considered when applying the filter. A larger kernel size will result in more smoothing, as more neighboring pixels are taken into account. The minimum value is 1, the maximum is 20, and the default is 3.
The sigma_color
parameter controls the degree to which the filter considers the color difference between pixels. A higher value allows for more color variation within the neighborhood, leading to more smoothing. This parameter is crucial for maintaining edge sharpness while reducing noise. The minimum value is 0.0, the maximum is 10.0, and the default is 0.25.
The sigma_space
parameter influences the spatial distance that the filter considers when averaging pixels. A larger value means that pixels further away from the target pixel will have more influence, resulting in a smoother image. This parameter helps in controlling the extent of the smoothing effect. The minimum value is 0.0, the maximum is 10.0, and the default is 1.25.
The output of the BilateralFilter node is an image or a set of images that have been processed with the bilateral filter. This output retains the important edges and details of the original image while reducing noise and smoothing out less significant variations. The result is typically a cleaner and more visually appealing image, suitable for further artistic manipulation or as a final product.
kernel_size
, sigma_color
, and sigma_space
values to achieve the desired balance between noise reduction and edge preservation. Smaller values will preserve more detail, while larger values will result in smoother images.kernel_size
parameter is set outside the allowed range of 1 to 20.kernel_size
parameter to be within the specified range.sigma_color
or sigma_space
parameters are set outside their respective ranges of 0.0 to 10.0.sigma_color
and sigma_space
are set within their valid ranges to avoid errors.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.