Visit ComfyUI Online for ready-to-use ComfyUI environment
Automate batch cropping of images in various formats for efficiency and consistency in preprocessing tasks.
The Batch Crop Image node is designed to streamline the process of cropping multiple images in a directory. This node is particularly useful for AI artists who need to prepare a large number of images for further processing or analysis. By specifying a directory and a crop amount, you can automatically crop all images within that directory, ensuring uniformity and saving significant time compared to manual cropping. The node supports various image formats, including PNG, JPG, JPEG, WEBP, BMP, and GIF, making it versatile for different types of projects. The primary goal of this node is to enhance efficiency and consistency in image preprocessing tasks.
This parameter specifies the directory containing the images you want to crop. It should be a string representing the path to the directory. The node will process all supported image files within this directory. Ensure that the directory exists and contains the images you wish to crop. If the directory does not exist, an error will be raised.
This parameter determines the amount to crop from each side of the image. It is a float value representing the percentage of the image's width to be cropped. The default value is 0.05 (5%). Adjusting this value will change how much of the image is cropped from each side, allowing for precise control over the final image dimensions.
The output is a list of cropped images. Each image in the list is processed according to the specified crop amount. The images are returned in a format suitable for further processing or analysis within your workflow. This output ensures that all images have been uniformly cropped, maintaining consistency across your dataset.
image_directory
parameter points to a valid directory containing the images you want to crop.crop_amount
parameter to achieve the desired cropping effect. A smaller value will result in less cropping, while a larger value will crop more of the image.<directory_path>
does not existimage_directory
parameter is correctly set to an existing directory path.crop_amount
parameter is set too high, resulting in an invalid crop size.crop_amount
parameter to a lower value to ensure that the cropped dimensions are valid.© Copyright 2024 RunComfy. All Rights Reserved.