Load Files From Folder (Step)
Walk through a folder in fixed-size batches, resized exactly how you want
- images
- masks
- files
This is the grown-up version of "load a folder of images." Load Files From Folder (Step) takes everything the plain folder loader does - read one or more folders into a single batch, sorted and sliced - and adds two things that make it actually usable in a batch-processing pipeline: a batch_index that slides the frame window forward so each run loads the next fixed-size chunk, and a files output that tells you the absolute path of every image loaded. It's also the official successor to the deprecated Load Batch From Folder (Advanced), inheriting that node's entire resize arsenal.
How the stepping works
frame_start / frame_end define the initial window into the combined, sorted frame list - negative values count from the end, so defaults of 0 and -1 mean "everything." The trick is batch_index: bump it by one and the node shifts the whole window forward by the size of the window itself, so you process the folder in fixed-size chunks across queue runs. Pair it with an incrementing integer (Eclipse's Integer Generate is built for exactly this) and a single workflow walks through an entire folder one batch at a time. resize_mode still controls size normalization, including list mode, which skips stacking and returns mixed-size images as a list for preview testing.
The resize arsenal, briefly
If your images need to be a specific size before they hit a batch-aware node, this is where the node earns the "Advanced" in its name:
scale_to+size- constrain by longest side, shortest side, width, height, or total pixels (in kilo-pixels).custom_width/custom_height- exact WΓH whenscale_toiscustom(0keeps the original dimension).aspect_ratio- override the ratio;originalkeeps it.fit- how to fit:resize(proportional),crop(fill then crop),pad(solid color),pad_edge/pad_edge_pixel(mean/edge colors),pillarbox_blur(blurred darkened background), orstretch(distort).crop_position,pad_color,method(default lanczos),divisible_by(round dims to a multiple, default 8), anddevice(cpu/gpu for resize ops - note lanczos isn't supported on GPU and silently falls back to bicubic).
Three outputs come back: images and masks as lists, plus files - the list of absolute file paths matching what was loaded. That third output is quietly the most useful one for anything that needs to track provenance or save results back with matching names.
Where it fits
Frame sequences for video, batches of reference crops, anything where you need "process the folder in chunks, in a stable order, at a guaranteed size." The files output makes it the natural front end for a pipeline that saves processed results named after their sources.
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. Dependencies are the pack's standard set. If you've landed here from the deprecated Advanced node, this is the one - same resizing, plus stepping and file paths on top.
Inputs (19)
| 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. |
| batch_index | INT | 00β99999 | Batch index. When increased, shifts the frame start/end to load the next batch of the same size. |
| 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; 'custom': resize using the advanced sizing and aspect ratio rules below. |
| scale_to | COMBO | longest | Which dimension to constrain: longest side, shortest side, width, height, total pixels (kilo-pixels), or custom WΓH. |
| size | INT | 10241β16384 | Target size for the chosen scale_to mode. For total_pixels this is in kilo-pixels (e.g. 1024 = ~1M pixels). |
| custom_width | INT | 5120β16384 | Target width when scale_to is 'custom'. 0 = keep original width. |
| custom_height | INT | 5120β16384 | Target height when scale_to is 'custom'. 0 = keep original height. |
| aspect_ratio | COMBO | original | Override aspect ratio. 'original' keeps the input image ratio. |
| fit | COMBO | resize | How to fit the image into target dimensions: β’ resize β scale proportionally (output may be smaller than target) β’ crop β scale to fill then crop excess β’ pad β scale to fit then pad with solid color β’ pad_edge β pad with mean color of nearest edge β’ pad_edge_pixel β pad by replicating edge pixels outward β’ pillarbox_blur β pad with blurred, desaturated, darkened background β’ stretch β distort to exact target size |
| crop_position | COMBO | center | Anchor point for crop and pad operations. |
| pad_color | STRING | #000000 | Background color for pad mode (hex, e.g. #000000). |
| method | COMBO | lanczos | Interpolation method for resampling. |
| divisible_by | INT | 81β512 | Round output dimensions to nearest multiple of this value. |
| device | COMBO | cpu | Device for resize operations. GPU is faster for large images. Lanczos is not supported on GPU and falls back to bicubic. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | Loaded (and optionally resized) images batch or list. |
| masks | MASK | Corresponding masks batch or list. |
| files | STRING | List of absolute file paths matching the loaded frames/images. |