ComfyUI > Nodes > Chaosaiart-Nodes > ๐Ÿ”ถ Load Image Batch - Advanced

ComfyUI Node: ๐Ÿ”ถ Load Image Batch - Advanced

Class Name

chaosaiart_Load_Image_Batch_2img

Category
๐Ÿ”ถChaosaiart/image
Author
chaosaiart (Account age: 355days)
Extension
Chaosaiart-Nodes
Latest Updated
2024-05-27
Github Stars
0.05K

How to Install Chaosaiart-Nodes

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

๐Ÿ”ถ Load Image Batch - Advanced Description

Load batch of two images from directory for AI art projects, streamlining workflow and handling image shortages gracefully.

๐Ÿ”ถ Load Image Batch - Advanced:

The chaosaiart_Load_Image_Batch_2img node is designed to load a batch of two images from a specified directory, facilitating the process of working with multiple images in your AI art projects. This node is particularly useful for scenarios where you need to process or analyze pairs of images sequentially. By automating the loading of image batches, it streamlines your workflow, allowing you to focus on creative tasks rather than manual file handling. The node ensures that even if the directory contains fewer images than expected, it will handle the situation gracefully by repeating the first or last image as necessary.

๐Ÿ”ถ Load Image Batch - Advanced Input Parameters:

path

The path parameter specifies the directory from which the images will be loaded. It is crucial to provide a valid directory path that contains the images you intend to process. The node will search this directory for image files and load them in batches of two. Ensure that the directory is not empty to avoid errors.

imgType_EXT

The imgType_EXT parameter defines the type of image files to be loaded, such as .jpg, .png, etc. This helps the node filter and identify the correct files within the specified directory. Make sure to use the correct file extension to match the images you want to load.

indexNum

The indexNum parameter indicates the starting index for loading images. It determines which image in the directory will be loaded first. If the index is set to a value less than 0, it will be reset to 0, and if it exceeds the number of available images, it will be set to the last image in the directory.

indexNum2

The indexNum2 parameter specifies the index for the second image to be loaded in the batch. Similar to indexNum, it ensures that the second image is within the valid range of available images in the directory. If it exceeds the number of images, it will be set to the last image.

Start_Image_Override

The Start_Image_Override parameter allows you to override the starting image with a specific image. This can be useful if you want to start the batch processing with a particular image rather than the one determined by indexNum.

Img2img_input_Size

The Img2img_input_Size parameter determines how the images will be resized or cropped to fit the required dimensions. Options include "resize" to adjust the image size proportionally and "crop" to trim the image to the desired dimensions. This ensures that the images are processed correctly according to your project's requirements.

batch_width

The batch_width parameter specifies the width of the images in the batch. This is used in conjunction with Img2img_input_Size to resize or crop the images appropriately.

batch_height

The batch_height parameter specifies the height of the images in the batch. This works with Img2img_input_Size to ensure the images are resized or cropped to the correct dimensions.

vae

The vae parameter refers to the Variational Autoencoder (VAE) model used for encoding and decoding images. It is essential for transforming images into latent representations and vice versa. Ensure that a valid VAE model is provided for the node to function correctly.

restart

The restart parameter controls whether the image loading process should restart. If set to a value greater than or equal to 1, the node will restart the loading process, either with the Start_Image_Override or an empty image if no override is provided.

๐Ÿ”ถ Load Image Batch - Advanced Output Parameters:

image

The image output parameter provides the first image loaded from the specified directory. This image is ready for further processing or analysis in your AI art project.

image2

The image2 output parameter provides the second image loaded from the specified directory. Like the first image, it is prepared for subsequent processing steps.

info

The info output parameter contains information about the loading process, such as any errors encountered or status messages. This can be useful for debugging and ensuring that the node is functioning as expected.

activ_index

The activ_index output parameter indicates the current index of the loaded images. This helps track the position within the directory and can be useful for sequential processing of image batches.

๐Ÿ”ถ Load Image Batch - Advanced Usage Tips:

  • Ensure that the directory specified in the path parameter contains a sufficient number of images to avoid errors.
  • Use the imgType_EXT parameter to filter the correct image types, especially if the directory contains mixed file types.
  • Adjust the indexNum and indexNum2 parameters to control which images are loaded first, allowing for flexible batch processing.
  • Utilize the Start_Image_Override parameter to start the batch with a specific image, which can be useful for testing or specific workflows.
  • Set the Img2img_input_Size parameter appropriately to ensure images are resized or cropped to fit your project's requirements.

๐Ÿ”ถ Load Image Batch - Advanced Common Errors and Solutions:

Chaosaiart - Load Batch Image: Error: Empty Directory!

  • Explanation: This error occurs when the specified directory does not contain any images.
  • Solution: Ensure that the directory path provided in the path parameter is correct and that it contains the images you want to load.

Chaosaiart - Load Image Batch: Below first image not allowed, repeat first image

  • Explanation: This message indicates that the indexNum parameter was set to a value less than 0.
  • Solution: Adjust the indexNum parameter to a value of 0 or higher to load the first image correctly.

Chaosaiart - Load Image Batch: its Last IMG, i will repeat it.

  • Explanation: This message appears when the indexNum or indexNum2 parameters exceed the number of available images in the directory.
  • Solution: Ensure that the indexNum and indexNum2 parameters are within the valid range of available images in the directory. Adjust them accordingly to avoid exceeding the number of images.

๐Ÿ”ถ Load Image Batch - Advanced Related Nodes

Go back to the extension to check out more related nodes.
Chaosaiart-Nodes
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.