Load Files From Folder (Soze)
Step through any file type, not just images
- File_Path
- Load_Count
- Input_Folder
- Filename
- Filename_No_Ext
- status
ComfyUI's built-in loaders are all about images. If what you're actually walking through is a folder of source files that aren't images at all - layered .psb/.psd files, raw audio, arbitrary data files a downstream custom node knows how to open - you need a loader that just hands back a path, and lets something else decide what to do with it. Load Files From Folder is that node: it doesn't try to interpret the file, it just tells you where it is.
The default extension filter is .psb - a strong hint the author built this originally for stepping through layered Photoshop source files, probably feeding them into a separate PSB-reading node elsewhere in a pipeline. But the extension field is yours to set to anything.
How it works
Point it at a folder and an extension filter; it walks the matching files and, driven by index, returns the path to one file per run - the same index-and-queue-count pattern the pack's image folder loaders use. file_load_count caps how many files it considers loading in total, separate from which single one index currently points at.
The inputs and outputs that matter
input_folder- required. The directory to scan.input_file_extensions- required, default.psb. Change this to match whatever file type you're actually loading -.wav,.txt,.zip, anything.file_load_count- optional, default1, min0. How many files from the folder are in scope for loading.index- optional, default0, range 0–1,000,000. Which file (by position) to return this run.- Output:
File_Path- the full path to the selected file. This is the payload - wire it into whatever custom node knows how to open your specific file type. - Output:
Load_Count,Input_Folder,Filename,Filename_No_Ext- bookkeeping outputs: how many files matched, the folder you scanned, and the filename in a couple of forms. - Output:
status- a status string for the load operation.
How to install it
ComfyUI Manager: search "Quality of Life Nodes for ComfyUI" or "Soze." Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/SozeInc/ComfyUI_Soze.git
pip install -r ComfyUI_Soze/requirements.txt
Restart. This node just walks a filesystem - no models, no image-processing dependency.
Common issues & troubleshooting
Nothing loads. Almost always the extension filter - it's an exact string match on input_file_extensions, so .PSB vs .psb (case) or a missing leading dot will silently return zero matches. Double-check the filter matches your actual filenames byte-for-byte.
This node doesn't decode your file - and that's expected. It only ever hands back a path (File_Path); it never opens or interprets the file's contents, because it's built for arbitrary file types the pack can't know how to parse in advance. You need a separate node downstream (a PSB reader, an audio loader, whatever matches your file type) that accepts a file path.
Index runs past the folder's contents. Check Load_Count against your index - if index exceeds the number of matching files, you'll get an error or an empty result rather than wrapping around.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| input_folder | STRING | — | |
| input_file_extensions | STRING | .psb | — |
| file_load_countopt | INT | 1 | — |
| indexopt | INT | 00–1000000 | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| File_Path | STRING | — |
| Load_Count | INT | — |
| Input_Folder | STRING | — |
| Filename | STRING | — |
| Filename_No_Ext | STRING | — |
| status | STRING | — |