Nodes/ComfyUI-Easy-Image-Nodes/Easy Load Images From Folder
ComfyUI Node

Easy Load Images From Folder

Batch a whole folder, one image per run — and let it run itself

By mengod-gh·Created 3 months ago·Updated 3 months ago· 0
Easy Load Images From Folder
    • IMAGE
    • MASK
    • filename
    • stem
    • extension
    • relative_path
    • index
    • total
    • job
    folder
    sort_orderascending
    auto_requeuefalse
    start_index0
    max_images0
    current_index0

    The grind of dataset work is not generating. It's the plumbing: 500 images in a folder, each needing the same resize, the same crop, the same upscale, and a save back under the original name. ComfyUI can do that with stock nodes - if you enjoy duct-taping a queue-trigger pack onto a batch loader. This node is the purpose-built version of that whole rig, and it's a lot less to hold in your head.

    Easy Load Images From Folder reads from a folder inside ComfyUI/input and returns exactly one image per execution, in a stable order. You build your processing pipeline once, put this node in front and Easy Save Image behind, and hit Queue. Each run grabs the next image; when the folder's done, it stops. For dataset prep - cleaning, resizing, upscaling a set before a LoRA run - this is the front door you actually want.

    The two inputs that do the work

    • folder - path relative to input/. The "choose folder to upload" button uploads a whole local folder (structure preserved) into input/ and fills this field for you.
    • auto_requeue - flip this on, connect the job output to Easy Save Image, and after each successful save the node re-queues the workflow for the next image automatically. That's the whole trick: no trigger nodes, no looping hacks.

    sort_order picks ascending or descending (sorted by recursive path, case-insensitive); start_index and max_images let you start mid-folder or cap a run (0 = no limit). current_index is the advanced one - leave it at 0. During auto requeue the queued prompt's copy of the index updates internally, so the visible widget may not move; that's expected, not a bug.

    Outputs

    The usual IMAGE and MASK, the filename quartet (filename, stem, extension, relative_path), plus index and total so you can see where a run stands, and job for the requeue machinery.

    One quirk worth knowing up front: relative_path excludes the selected top-level folder name. A file at DatasetRoot/dataset/sample1.png with folder=DatasetRoot reports dataset/sample1.png - and wiring that into Easy Save Image's filename reproduces the folder structure in output/. Deliberate, and it's what makes clean round-trips work.

    How it works

    It recursively scans the folder for supported images (png, jpg, jpeg, webp, bmp, tif, tiff), sorts them, and indexes in. Only input/ is ever read; absolute paths and .. are rejected. The requeue is handled server-side: after a save succeeds, it deep-copies the running prompt, bumps the index, and puts the same workflow back on the queue - with a guard so you don't get double-queued duplicates.

    Where people get burned

    If your index runs past the end of the list, you get a clean error stating the valid range - that's your "done" signal when auto_requeue is off. The folder must be under input/, so use the upload button rather than typing a path from somewhere else. And remember this is one-image-per-execution: if your pipeline batches internally, this node isn't the right front door.

    Install

    Same as the rest of the pack: ComfyUI Manager → "ComfyUI-Easy-Image-Nodes", or:

    cd /path/to/ComfyUI/custom_nodes
    git clone https://github.com/mengod-gh/ComfyUI-Easy-Image-Nodes.git
    

    Restart ComfyUI after. No models, no extra dependencies.

    People have been doing this for years with was-node-suite's Load Image Batch plus an impact-pack Queue Trigger, and that combo works - it's just two packs' worth of configuration to babysit. This is the "I only want to process this folder" option, and for a dataset grind, that's usually exactly the scope you want.

    CategoryEasy Image Nodes

    Inputs (6)

    NameTypeDefaultDescription
    folderSTRING
    sort_orderCOMBOascending2 options: ascending, descending
    auto_requeueBOOLEANfalse
    start_indexINT00–1000000
    max_imagesINT00–1000000
    current_indexINT00–1000000

    Outputs (9)

    NameTypeDescription
    IMAGEIMAGE
    MASKMASK
    filenameSTRING
    stemSTRING
    extensionSTRING
    relative_pathSTRING
    indexINT
    totalINT
    jobEASY_IMAGE_JOB