Visit ComfyUI Online for ready-to-use ComfyUI environment
Streamline batch conversion of image files to desired format, saving time and reducing errors.
The BatchConvertImageFiles| Batch Convert Image Files 🐑
node is designed to streamline the process of converting multiple image files within a specified directory to a desired format, such as JPEG or PNG. This node is particularly beneficial for users who need to manage large collections of images and require a consistent format for further processing or archiving. By automating the conversion process, it saves time and reduces the potential for human error. The node also offers the flexibility to either retain the original files by saving them in a backup directory or to delete them after conversion, depending on your preference. This functionality is crucial for maintaining an organized workflow and ensuring that your image files are in the correct format for your specific needs.
The directory
parameter specifies the path to the folder containing the image files you wish to convert. It is crucial as it determines the source location from which the node will retrieve the images for conversion. There are no specific minimum or maximum values for this parameter, but it must be a valid directory path on your system.
The target_format
parameter defines the desired image format to which all images in the specified directory will be converted. Supported formats include 'jpg' and 'png'. This parameter is essential as it dictates the output format of the converted images, ensuring they meet your requirements for further use or distribution. There are no default values, so you must specify either 'jpg' or 'png'.
The save_original
parameter is a boolean that determines whether the original image files should be retained after conversion. If set to True
, the original files are moved to a backup directory within the specified folder, preserving them for future reference. If False
, the original files are deleted post-conversion. This parameter is important for managing storage space and maintaining a clean directory structure. The default value is not specified, so you must explicitly choose True
or False
.
The converted_count
output parameter indicates the number of image files successfully converted to the target format. This count provides a quick overview of the node's effectiveness and helps verify that all intended files have been processed.
The log_message
output parameter provides a detailed log of the conversion process, including the number of images converted, the target format, the directory where the conversion took place, and the timestamp of the operation. If the original files are saved, the log also includes the location of the backup directory. This message is useful for record-keeping and troubleshooting.
directory
parameter points to a folder containing only the images you wish to convert, as the node will attempt to process all supported image files within that directory.save_original
parameter wisely based on your storage constraints and the necessity of keeping original files. If storage is limited, consider setting it to False
to delete originals after conversion.<directory>
.<directory>
.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.