Run ComfyUI Easily with InstaSD

Skip the complex setup and run ComfyUI online. InstaSD helps creative professionals build workflows and deploy them to the world:

  • One-click deployment
  • Any model, any node
  • Powerful GPUs for rapid iteration
Get Started

Available Nodes

easy loadImagesForLoop

Documentation for easy loadImagesForLoop Node

Overview

The easy loadImagesForLoop node is a component of the ComfyUI-Easy-Use package. It is designed to facilitate batch processing of images from a specified directory, enabling iterative workflows that loop through multiple image files.

Functionality

The primary purpose of the easy loadImagesForLoop node is to load images sequentially from a specified directory. It outputs one image at a time, allowing other nodes in the workflow to process each image individually before moving on to the next. This is particularly useful for automation in workflows that require processing multiple images without manual intervention.

Inputs

The node accepts the following inputs:

  • Directory: A string input specifying the path to the directory containing the images to be processed.
  • Start Index: An integer input indicating the position in the directory listing from which to start loading images. The default is 0.
  • Limit: An integer input that sets the maximum number of images to process. If set to -1, it processes all images starting from the start index.

Optional inputs:

  • Initial Value 1: Any data type. This is a placeholder for passing additional initial data through the loop.
  • Initial Value 2: Any data type. Another placeholder for passing additional initial data through the loop.

Outputs

The node produces the following outputs:

  • Flow: A placeholder used to manage the flow control in workflows.
  • Index: An integer indicating the current index of the image being processed.
  • Image: The loaded image.
  • Mask: A corresponding mask for the loaded image, if applicable. Otherwise, a default mask is provided.
  • Name: A string containing the name of the current image file.
  • Value 1: Carries forward the data passed through Initial Value 1.
  • Value 2: Carries forward the data passed through Initial Value 2.

Usage in ComfyUI Workflows

The easy loadImagesForLoop node is typically used in workflows where batch processing of images is required. By integrating this node:

  • Users can automate the handling of multiple images, eliminating the need for manual loading and adjusting of images.
  • It allows workflows to process images one by one, performing operations like transformations, segmentation, or analysis in an organized manner.
  • The node is especially valuable in workflows designed for model training or testing scenarios where images need to be analyzed or enhanced iteratively.

Special Features and Considerations

  • Filter by Extensions: The node automatically filters and processes only valid image files based on common image file extensions such as .jpg, .jpeg, .png, and .webp.
  • Sequencing: Images are processed in a sequence determined by their directory listings, allowing ordered and predictable batch operations.
  • Flow Control: The node supports integration with flow control nodes, making it easier to construct complex processing loops within ComfyUI.
  • Error Handling: It raises an error if the specified directory is invalid or empty, ensuring users quickly identify and rectify input issues.

The easy loadImagesForLoop node is an essential tool for users seeking to enhance the efficiency and automation capabilities within their ComfyUI workflows by simplifying image batch processing tasks.

Want to try ComfyUI-Easy-Use without installing anything? Run ComfyUI online on InstaSD's cloud GPUs — no setup required.