Sequential Image Loader V8
Load a folder of images one at a time — and slam the same mask on every one
- mask
- image
- mask
- filename
- total_images
If you've ever sat there with a folder of 200 PNGs and thought "I need to run each one through the same img2img pass, one at a time," you've just met the point of Sequential Image Loader V8. ComfyUI's built-in LoadImage wants you to pick a file in a browser dialog every single run. This node instead points at a directory, hands you image number N, and - the part that makes it interesting - applies the exact same mask to each one. It's a one-trick pack, but the trick is a real workflow gap.
A quick honesty check on the name: "V8" is more confidence than version history. The class is just SequentialImageLoader, there's no V1–V7 lineage, and this is the only node in the pack. Don't hold that against it; just don't go looking for the older versions.
How it works
The node globs *.png and *.jpg in your folder_path, sorts the filenames, and loads the one at current_index (starting at 0). It resizes the image to resize_width × resize_height, does the same resize to your incoming mask so they stay perfectly aligned, and pushes everything out. Set current_index to 0, run, bump it to 1, run again - that's the loop, usually driven by whatever batch or frame-index logic you're already using.
Two things the source makes clear that the README buries:
- The
maskinput is required. There is no "no mask" mode. Want to just step through images? You still need to wire a mask in - a solid white one from a MaskToImage/blank mask node works. This trips up more people than anything else in this pack. - The default resize is 3840×2160. That's 4K. Feed it a folder of 512px frames at defaults and it upscales every one of them to 4K before it even touches a sampler, which is a great way to melt your VRAM for no reason. Set
resize_width/resize_heightto something sane for your actual model.
Also note it only matches .png and .jpg - no .jpeg, .webp, or .bmp. And the sort is plain lexicographic, so frame10.png sorts before frame2.png. Rename your frames with zero-padding if the order matters.
Inputs that matter
- folder_path - the directory. Everything else flows from this.
- mask - your ComfyUI MASK, resized to match and (by default) binarized.
- current_index - which image to load; errors out if it exceeds the count.
- resize_width / resize_height - keep these realistic, see above.
- binarize_mask - on by default; everything over 0.5 becomes 1, under becomes 0. Fine for hard inpaint regions, but if you built a feathered mask you'll want this off to keep the soft edges.
- image_interpolation / mask_interpolation - BICUBIC for the photo, NEAREST for the mask is a sensible pairing and it's the default; NEAREST keeps mask edges crisp.
Outputs
- image - the loaded, resized image. Straight into your VAE encode or image-to-image sampler.
- mask - the adjusted mask, in standard
[1, H, W]MASK format, compatible with ResizeMask, SetLatentNoiseMask, or a VAE Encode for Inpaint. That's the whole game: one mask, every frame, bit-identical unmasked pixels. - filename and total_images - handy for logging or for driving an index that resets when you hit the end of the folder.
Installation
Easiest via ComfyUI Manager - search "Whykiki ComfyUI Toolset" and install. Or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/TheWhykiki/Whykiki-ComfyUIToolset.git
cd Whykiki-ComfyUIToolset
pip install -r requirements.txt
Then restart ComfyUI. Good news on the dependencies: requirements.txt is just pillow, numpy, torch, torchvision - all of which you already have if ComfyUI runs at all. No model files, no weights, nothing to download.
Where people get burned
The required-mask thing and the 4K default are the two big ones, and both are silent - no error until something downstream chokes. Missing files or an out-of-range index raise a clear Python error, so at least those tell you what happened. The bigger gotcha is expectations: this is a bare-bones tool from a small, MIT-licensed side project (the code comments are in German, the README is bilingual). There's a more polished, more popular take on the same idea out there with browse dialogs, thumbnails, and file filtering if you outgrow this one. But if you want "folder → image N → same mask → go," this does exactly that with zero fat.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| folder_path | STRING | — | |
| mask | MASK | — | |
| current_index | INT | 0 | — |
| resize_width | INT | 3840 | — |
| resize_height | INT | 2160 | — |
| image_interpolation | COMBO | BICUBIC | 3 options: BICUBIC, BILINEAR, NEAREST |
| mask_interpolation | COMBO | NEAREST | 3 options: BILINEAR, NEAREST, BICUBIC |
| binarize_mask | BOOLEAN | true | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| filename | STRING | — |
| total_images | INT | — |