Visit ComfyUI Online for ready-to-use ComfyUI environment
Save generated images to specified path with format and quality control for efficient management.
The SaveImagetoPath
node is designed to save an image to a specified file path on your system. This node is particularly useful for AI artists who need to store their generated images in a structured and organized manner. By specifying the path and format, you can ensure that your images are saved exactly where you want them, with the desired quality and compression settings. This node supports various image formats such as JPEG, PNG, and BMP, and allows for customization of parameters like JPEG quality and PNG compression level. The main goal of this node is to provide a flexible and efficient way to save images, making it easier for you to manage and access your artwork.
The path
parameter specifies the file path where the image will be saved. It should be a string representing the directory and filename. This parameter is crucial as it determines the location and name of the saved image. Ensure that the path is valid and that you have write permissions to the specified directory.
The image_format
parameter defines the format in which the image will be saved. Supported formats include .jpg
, .png
, and .bmp
. This parameter affects the quality and compression of the saved image. For example, JPEG format allows for quality adjustment, while PNG supports lossless compression.
The image
parameter is a tensor representing the image to be saved. This tensor should have three channels (RGB) and be in the range of 0 to 1. The image tensor is the core input that will be processed and saved to the specified path.
The save_sequence
parameter is a boolean that determines whether to save the image as part of a sequence. If set to true
, the node will append a sequence number to the filename to avoid overwriting existing files. This is useful for saving multiple images in a series.
The jpg_quality
parameter specifies the quality of the saved JPEG image, ranging from 1 (lowest quality) to 95 (highest quality). This parameter is only applicable if the image_format
is set to .jpg
. Higher quality values result in larger file sizes.
The png_compress_level
parameter defines the compression level for PNG images, ranging from 0 (no compression) to 9 (maximum compression). This parameter is only applicable if the image_format
is set to .png
. Higher compression levels result in smaller file sizes but may take longer to save.
The filename
parameter is a string representing the name of the saved image file. This output is useful for verifying the exact name of the saved file, especially when saving images as part of a sequence.
The subfolder
parameter is a string representing the subfolder where the image was saved. This output helps you locate the saved image within the specified directory structure.
The type
parameter indicates the type of the output, which is output
in this case. This output is mainly for internal use and helps in categorizing the saved file.
path
parameter is set to a valid directory where you have write permissions to avoid errors during the save process.save_sequence
parameter to prevent overwriting existing files when saving multiple images in a series.jpg_quality
and png_compress_level
parameters to balance between image quality and file size based on your needs.{img.shape[0]}
images"{img.shape[0]}
channels"{ext}
"image_format
is not supported by the node..jpg
, .png
, or .bmp
.path
is invalid or the directory is not writable.© Copyright 2024 RunComfy. All Rights Reserved.