ComfyUI > Nodes > ComfyUI-Image-Filters > Alpha Clean

ComfyUI Node: Alpha Clean

Class Name

AlphaClean

Category
image/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

Alpha Clean Description

Enhance image quality by cleaning alpha channel for precise transparency adjustments using advanced filtering techniques.

Alpha Clean:

AlphaClean is a powerful node designed to enhance the quality of images by cleaning up the alpha channel, which represents transparency. This node is particularly useful for AI artists who work with images that require precise transparency adjustments. By applying a series of advanced filtering techniques, AlphaClean smooths out the alpha channel, fills in holes, and adjusts the transparency levels to achieve a cleaner and more refined result. The main goal of AlphaClean is to improve the visual quality of images with transparency, making them look more polished and professional.

Alpha Clean Input Parameters:

images

This parameter takes a tensor of images that you want to process. The images should be in a format compatible with PyTorch tensors.

radius

The radius parameter controls the size of the Gaussian blur applied to the alpha channel. A larger radius results in a more significant blur effect, which can help smooth out rough edges in the alpha channel. The value should be an integer, with a typical range from 1 to 64. The default value is 8.

fill_holes

This parameter determines whether the node should fill in small holes in the alpha channel. A higher value will fill larger holes, making the alpha channel more solid. The value should be an integer, with a typical range from 0 to 64. The default value is 0.

white_threshold

The white_threshold parameter sets the threshold for what is considered "white" in the alpha channel. Pixels with values above this threshold will be treated as fully opaque. The value should be a float between 0.0 and 1.0. The default value is 0.1.

extra_clip

This parameter allows you to apply an additional clipping factor to the alpha channel, which can help enhance the contrast between transparent and opaque areas. The value should be a float, typically between 0.0 and 1.0. The default value is 0.1.

Alpha Clean Output Parameters:

cleaned_images

This output parameter returns a tensor of cleaned images. The images will have a refined alpha channel with smoother transitions and fewer artifacts, resulting in a more polished appearance.

Alpha Clean Usage Tips:

  • For images with very rough or jagged edges in the alpha channel, try increasing the radius parameter to apply a stronger blur effect.
  • If you notice small holes or gaps in the alpha channel, adjust the fill_holes parameter to fill them in and create a more solid alpha channel.
  • Use the white_threshold parameter to fine-tune the transparency levels, especially if your images have varying degrees of opacity.
  • Experiment with the extra_clip parameter to enhance the contrast between transparent and opaque areas, making the alpha channel more defined.

Alpha Clean Common Errors and Solutions:

"Input tensor is not in the correct format"

  • Explanation: The input images tensor is not in a format compatible with PyTorch.
  • Solution: Ensure that the input images are provided as a PyTorch tensor.

"Radius value out of range"

  • Explanation: The radius parameter is set to a value outside the acceptable range.
  • Solution: Adjust the radius parameter to be within the range of 1 to 64.

"White threshold value out of range"

  • Explanation: The white_threshold parameter is set to a value outside the acceptable range.
  • Solution: Adjust the white_threshold parameter to be within the range of 0.0 to 1.0.

"Extra clip value out of range"

  • Explanation: The extra_clip parameter is set to a value outside the acceptable range.
  • Solution: Adjust the extra_clip parameter to be within the range of 0.0 to 1.0.

Alpha Clean 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.