Nodes/Comfy_KepListStuff/Image List Loader
ComfyUI Node

Image List Loader

Load a whole folder of images in one node

By M1kep·Created 3 years ago·Updated 2 years ago· 56
Image List Loader
    • Images
    folder_path
    file_filter*.png
    sort_methodnumerical

    There's a folder on your disk with forty reference images in it, and you want all forty in your workflow without adding forty Load Image nodes. Image List Loader is the node that reads a whole folder in one go and hands you a proper list of IMAGE tensors - ready to feed an img2img batch, an IP-Adapter reference set, or a grid of images you already generated.

    Three inputs, and you mostly touch the first two:

    • folder_path - the directory to scan. Can be absolute (D:\refs\faces) or relative to where ComfyUI runs.
    • file_filter - a glob pattern, default *.png. Want jpgs too? *.jpg, *.png won't work, but you can point a second loader at the same folder - or just use *.png and be grateful PNG exists.
    • sort_method - numerical (default) or alphabetical.

    That sort_method default is worth understanding, because it's the difference between a grid that reads naturally and one that looks shuffled. alphabetical sorts the raw filenames, which is a classic trap: img10.png sorts before img2.png because "1" < "2" lexicographically. numerical strips the non-digits out of each name and sorts by the resulting number, so img2.png properly lands before img10.png. If your files are numbered, leave it on numerical. If they have meaningful text names, alphabetical.

    Under the hood it's a Path.glob - which means no recursion into subfolders, just the top level of the folder you point at - followed by Image.open() on each match. The output is Images, a list of IMAGE tensors.

    The failure modes are the honest kind: give it a folder path that doesn't exist and it throws Folder path ... does not exist. Give it a folder with a corrupt or non-image file that matches your filter and the whole load dies on that file - there's no skip-and-continue. So keep the filter tight and the folder clean.

    Where this shines in a bigger workflow: load a folder of renders, wire the Images list into a grid assembler like XYImage with the right splits, and you've turned a folder of outputs into a labeled comparison grid with zero manual arranging. It also pairs naturally with the pack's list machinery - check the count with List Length, merge folders with Join Image Lists.

    Install is the standard custom-node one-liner, and this pack needs no extra pip packages - torch, Pillow, numpy and matplotlib all ship with ComfyUI:

    cd ComfyUI/custom_nodes
    git clone https://github.com/M1kep/Comfy_KepListStuff
    

    Restart ComfyUI, or just search Comfy_KepListStuff in ComfyUI Manager. The node lives under List Stuff. Point it at a folder, pick your filter, and let the batch begin.

    CategoryList Stuff

    Inputs (3)

    NameTypeDefaultDescription
    folder_pathSTRING
    file_filterSTRING*.png
    sort_methodCOMBOnumerical2 options: numerical, alphabetical

    Outputs (1)

    NameTypeDescription
    ImagesIMAGE