ComfyUI > Nodes > Various custom nodes by Eden.art > LoadImagesByFilename

ComfyUI Node: LoadImagesByFilename

Class Name

LoadImagesByFilename

Category
Eden 🌱
Author
aiXander (Account age: 302days)
Extension
Various custom nodes by Eden.art
Latest Updated
2024-07-23
Github Stars
0.04K

How to Install Various custom nodes by Eden.art

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

LoadImagesByFilename Description

Node for loading and processing multiple images from filenames, offering flexibility in processing order and transformations for image dataset management.

LoadImagesByFilename:

The LoadImagesByFilename node is designed to load and process multiple images from a list of filenames. This node is particularly useful for AI artists who need to work with a batch of images, ensuring they are uniformly processed and ready for further manipulation or analysis. The node offers flexibility in terms of the number of images to load, the order in which they are processed, and whether the sequence should loop. It also handles image transformations to ensure consistency in format and quality, making it an essential tool for managing image datasets efficiently.

LoadImagesByFilename Input Parameters:

filename

This parameter accepts a list of filenames that specify the images to be loaded. Each filename should be a valid path to an image file. The node will process these files based on the other parameters provided.

max_num_images

This integer parameter sets the maximum number of images to load from the provided list. If set to 0, all images in the list will be loaded. The default value is None, meaning there is no limit unless specified.

seed

An integer seed value used for randomizing the order of the images. This ensures reproducibility of the random shuffling. The default value is 0, with a minimum of 0 and a maximum of 100000.

sort

A boolean parameter that determines whether the images should be sorted alphabetically by their filenames. The default value is False.

loop_sequence

A boolean parameter that, when set to True, ensures the last image in the sequence is the same as the first image, effectively creating a loop. The default value is False.

LoadImagesByFilename Output Parameters:

IMAGE

The output is a tensor containing the loaded and processed images. If multiple images are loaded, they are concatenated into a single tensor. Each image is converted to RGB format and normalized to a float32 array with values between 0 and 1.

LoadImagesByFilename Usage Tips:

  • To ensure reproducibility, always set the seed parameter when randomizing the order of images.
  • Use the sort parameter to maintain a consistent order of images if the sequence is important for your project.
  • If you need to create a looping animation or sequence, set the loop_sequence parameter to True.
  • Adjust the max_num_images parameter to limit the number of images processed, which can be useful for handling large datasets.

LoadImagesByFilename Common Errors and Solutions:

FileNotFoundError

  • Explanation: This error occurs when one or more filenames in the list do not point to valid image files.
  • Solution: Ensure all filenames in the list are correct and point to existing image files.

ValueError: cannot identify image file

  • Explanation: This error occurs when a file in the list is not a valid image or is corrupted.
  • Solution: Verify that all files in the list are valid images and not corrupted.

TypeError: 'NoneType' object is not subscriptable

  • Explanation: This error may occur if the list of filenames is empty or not provided.
  • Solution: Ensure that the filename parameter is a non-empty list of valid image filenames.

RuntimeError: Expected 4-dimensional input for 4-dimensional weight

  • Explanation: This error can occur if the images are not correctly processed into the expected tensor format.
  • Solution: Verify that all images are correctly loaded and processed into the expected format. Check for any inconsistencies in image dimensions or types.

LoadImagesByFilename Related Nodes

Go back to the extension to check out more related nodes.
Various custom nodes by Eden.art
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.