Load Files From Folder
Dump a whole folder of images into one batch, sorted and sliced how you like
- images
- masks
The stock Load Image node wants you to pick one file from a dropdown. That's fine for a single image, but when you have a folder of frames or reference shots and you want them as a batch, you need something else. Load Files From Folder (the display name for "Load Batch From Folder") reads an entire folder - or several folders - and hands you one combined image batch and one mask batch, ready for batch-aware processing downstream. It's the loader you reach for when the input isn't "an image" but "a set of images."
How it works
folder_path is a multiline field, and the plural is deliberate: you can list multiple folders, one per line, and all of them get merged into a single combined batch (the index spans across them). Absolute paths are supported anywhere on disk, not just under ComfyUI's input folder. include_subfolders (default off) walks recursively. Then come the two controls that make this genuinely useful rather than just "load everything":
sort_by(name, date_modified, date_created, size) andsort_order(ascending/descending) control the order - and the order is what determines which frame is "first," so it matters for anything frame-order-sensitive. The source sorts with a deterministic secondary key, so the same folder loads in the same order every time.frame_start/frame_endslice the combined list before anything else happens.0= first frame,-1= last frame, and negative values count from the end. Soframe_start = 0, frame_end = -1means "everything," and you can load a subset by changing either end.
The resize_mode catch
This is the one that bites people. Batches in ComfyUI are rectangular tensors - every image in a batch must share the same dimensions. Real folders rarely cooperate. resize_mode decides how to handle it:
first- resize everything to the first image's dimensions (default).largest/smallest- resize to the biggest or smallest WΓH found.none- raise an error if any sizes differ. Use this when you know the folder is uniform and you want a crash rather than a surprise resize.list- skip stacking entirely and return the images as a list, allowing mixed sizes. The tooltip's honest note: useful for preview testing.
Outputs are images and masks as lists, so a downstream "Convert to Batch"-style node can take over if you need a stacked tensor.
Where it fits
Frame sequences for video work, reference sets for style transfer, a folder of crops you want to process uniformly - anything where "the whole folder" is the input. It pairs naturally with Eclipse's batch utilities and the loop calculator family. If your folder has mixed sizes, decide your resize strategy up front; the default first will quietly change every image's dimensions, which may or may not be what you wanted.
Install
Part of ComfyUI_Eclipse:
cd ComfyUI/custom_nodes
git clone https://github.com/r-vage/ComfyUI_Eclipse
Or install ComfyUI_Eclipse from ComfyUI Manager and restart. Uses Pillow and torch, both in the pack's requirements. If you need per-image loading with random/increment index modes instead of a whole-batch dump, the sibling Load Image From Folder in the same pack is the one to grab.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| folder_path | STRING | Path(s) to folder(s) containing images. One folder per line. Absolute paths are supported anywhere on the filesystem. All images are loaded and returned as a single batch. | |
| include_subfolders | BOOLEAN | false | Include images from subfolders recursively. |
| sort_by | COMBO | name | How to sort images within each folder. |
| sort_order | COMBO | ascending | Sort order for the image list. |
| frame_start | INT | 0-99999β99999 | First frame to include from the combined frame list. 0 = first frame. Negative values count from the end (-1 = last frame). |
| frame_end | INT | -1-99999β99999 | Last frame to include, inclusive. -1 = last frame. Negative values count from the end. Range is applied before resize_mode normalization. |
| resize_mode | COMBO | first | How to handle images with different sizes. 'first': resize all to the first image's dimensions; 'largest': resize to the largest WΓH found; 'smallest': resize to the smallest WΓH found; 'none': raise an error if any sizes differ; 'list': skip stacking entirely and return images as a list β allows mixed sizes, useful for preview testing. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | β |
| masks | MASK | β |