ComfyUI > Nodes > ComfyUI_MieNodes > Batch Convert Image Files 🐑

ComfyUI Node: Batch Convert Image Files 🐑

Class Name

BatchConvertImageFiles|Mie

Category
🐑 MieNodes/🐑 Caption Tools
Author
mie (Account age: 1888days)
Extension
ComfyUI_MieNodes
Latest Updated
2025-04-17
Github Stars
0.05K

How to Install ComfyUI_MieNodes

Install this extension via the ComfyUI Manager by searching for ComfyUI_MieNodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI_MieNodes 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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Batch Convert Image Files 🐑 Description

Streamline batch conversion of image files to desired format, saving time and reducing errors.

Batch Convert Image Files 🐑| Batch Convert Image Files 🐑:

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.

Batch Convert Image Files 🐑| Batch Convert Image Files 🐑 Input Parameters:

directory

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.

target_format

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'.

save_original

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.

Batch Convert Image Files 🐑| Batch Convert Image Files 🐑 Output Parameters:

converted_count

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.

log_message

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.

Batch Convert Image Files 🐑| Batch Convert Image Files 🐑 Usage Tips:

  • Ensure that the 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.
  • Use the 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.

Batch Convert Image Files 🐑| Batch Convert Image Files 🐑 Common Errors and Solutions:

No supported image files found in <directory>.

  • Explanation: This error occurs when the specified directory does not contain any image files in the supported formats (jpeg, png, bmp, gif, tiff, webp).
  • Solution: Verify that the directory path is correct and that it contains image files in one of the supported formats. If necessary, move the desired images into the directory and try again.

Permission denied when accessing <directory>.

  • Explanation: This error indicates that the node does not have the necessary permissions to read from or write to the specified directory.
  • Solution: Check the directory permissions and ensure that the node has the appropriate access rights. You may need to adjust the permissions or run the process with elevated privileges.

Batch Convert Image Files 🐑 Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_MieNodes
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

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.