ComfyUI > Nodes > KJNodes for ComfyUI > Save Image With Alpha

ComfyUI Node: Save Image With Alpha

Class Name

SaveImageWithAlpha

Category
KJNodes/image
Author
kijai (Account age: 2192days)
Extension
KJNodes for ComfyUI
Latest Updated
2024-06-25
Github Stars
0.35K

How to Install KJNodes for ComfyUI

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

Save Image With Alpha Description

Save images with alpha channel, preserving transparency for AI artists, combining images and masks into PNG with metadata.

Save Image With Alpha:

The SaveImageWithAlpha node is designed to save images with an alpha channel, allowing you to preserve transparency information in your images. This is particularly useful for AI artists who need to maintain the integrity of transparent areas in their artwork. The node processes images and their corresponding alpha masks, combines them, and saves the result as a PNG file with an alpha channel. Additionally, it can embed metadata such as prompts and extra information into the saved image, making it easier to keep track of the context and details of each image. This node is essential for workflows that require high-quality image outputs with transparency, ensuring that your creative work retains its intended visual properties.

Save Image With Alpha Input Parameters:

images

This parameter expects a list of images that you want to save with an alpha channel. Each image should be in a format that can be processed by the node, typically a tensor. The images will be combined with their corresponding alpha masks to produce the final output.

mask

This parameter expects a list of alpha masks corresponding to the images provided. Each mask should be in a format that can be processed by the node, typically a tensor. The masks define the transparency levels for the images, where the alpha channel will be applied.

filename_prefix

This optional parameter allows you to specify a prefix for the filenames of the saved images. The default value is "ComfyUI_image_with_alpha". This prefix helps in organizing and identifying the saved images, especially when saving multiple images in a batch.

prompt

This optional parameter allows you to embed a text prompt into the metadata of the saved image. This can be useful for keeping track of the context or inspiration behind the image. If provided, the prompt will be stored in the PNG metadata.

extra_pnginfo

This optional parameter allows you to embed additional metadata into the saved image. It expects a dictionary where keys are metadata fields and values are the corresponding information. This can be useful for storing extra details about the image, such as creation settings or artist notes.

Save Image With Alpha Output Parameters:

ui

This output parameter provides a dictionary containing information about the saved images. It includes details such as the filenames, subfolders, and types of the saved images. This information can be used to verify the successful execution of the node and to locate the saved images.

Save Image With Alpha Usage Tips:

  • Ensure that the images and masks provided are in the correct format and correspond to each other to avoid mismatches.
  • Use the filename_prefix parameter to organize your saved images, especially when working with multiple batches.
  • Embed prompts and extra metadata using the prompt and extra_pnginfo parameters to keep track of the context and details of your images.

Save Image With Alpha Common Errors and Solutions:

"Image and mask dimensions do not match"

  • Explanation: This error occurs when the dimensions of the provided images and masks do not match.
  • Solution: Ensure that each image and its corresponding mask have the same dimensions before passing them to the node.

"Invalid image or mask format"

  • Explanation: This error occurs when the provided images or masks are not in a format that can be processed by the node.
  • Solution: Ensure that the images and masks are in the correct tensor format and are compatible with the node's processing requirements.

"Failed to save image"

  • Explanation: This error occurs when the node is unable to save the image to the specified location.
  • Solution: Check the file path and permissions to ensure that the node has the necessary access to save the image. Also, verify that the filename prefix and other parameters are correctly specified.

Save Image With Alpha Related Nodes

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