ComfyUI-SequentialImageLoader Introduction
ComfyUI-SequentialImageLoader is a ComfyUI node that loads images from a folder one at a time, in a predictable order. Each time you queue your workflow, the node loads the next image in the sequence.
This is useful when you want to process a folder of frames, photos, renders, or other images through the same ComfyUI workflow without manually replacing the input image after every run.
The extension helps you:
- Process one image per queue run, giving you time to review the result and adjust settings.
- Work through a folder without repeatedly editing a standard
Load Imagenode. - Process images in natural filename order, so
frame2.pngcomes beforeframe10.png. - Include images inside subfolders when needed.
- Run through a folder in forward or reverse order.
- Jump directly to a particular position using the status bar.
- Pause on one image while adjusting the rest of your workflow.
- Queue the remaining images automatically and stop when the folder is complete.
- See which image was loaded and which image will be loaded next.
The author designed the node as a middle ground between manually loading every image and processing an entire folder as one large batch. Each run still handles one image, which makes it easier to monitor results and avoid sending a large number of images through your workflow at once.
How ComfyUI-SequentialImageLoader Works
Think of the node as a bookmark placed inside a folder of images.
- You choose a folder.
- The node finds the supported image files in that folder.
- It sorts the files into a sequence.
- The node remembers its current position.
- When you queue the workflow, it loads the image at that position.
- The next queue advances the position and loads the following image.
For example, a folder might contain:
frame1.png
frame2.png
frame3.png
frame10.png
Natural sorting places these files in the expected order:
frame1.png
frame2.png
frame3.png
frame10.png
The first queue loads frame1.png. The next queue loads frame2.png, and so on.
The node advances after the queued prompt has been sent. This means the current run uses the image currently selected, while the following queue uses the next image. When the sequence reaches the final file, it wraps around to the first file.
The node does not create one large image batch. Each queue processes exactly one image. This makes it suitable for workflows where you want to inspect each result, change prompts or settings between runs, or limit memory use.
The node also provides image information alongside the image itself. You can use the filename, position, total file count, and full file path in other parts of your workflow when those values are useful.
ComfyUI-SequentialImageLoader Features
Folder selection
Enter a folder path in the directory field, or use Browse for folder… to select a folder through a built-in browser.
The folder picker works with the ComfyUI server's filesystem. It also shows how many matching files are available in each folder, helping you choose the correct location.
One image per queue
Every queue loads one image from the current position.
This is useful when:
- You want to check every generated result before continuing.
- You need to adjust denoising, prompts, ControlNet settings, or other workflow controls between images.
- You are working with a long sequence and do not want to process everything at once.
- You want to stop after a particular image.
Queue all
Queue all automatically queues the remaining images one after another. It waits for each run to finish before starting the next one and stops automatically after the last file.
This differs from ComfyUI's general auto-queue behavior, which can continue indefinitely. The Sequential Image Loader knows where the selected folder ends.
While active, the button becomes Stop queueing. You can stop the sequence early. An error or an interruption also stops the automatic queueing process.
Queue all starts at the current position. To process the entire folder from the beginning:
- Select Reset to start.
- Select Queue all.
File type filtering
Use the filetype setting to decide which files are included:
pngjpgjpegwebpbmpgiftiffall
The jpg and jpeg choices match both .jpg and .jpeg files. The tiff choice matches both .tif and .tiff files.
Selecting all includes every supported image type found in the folder.
Include subfolders
Enable include_subfolders to search through the selected folder and its subfolders.
This is helpful when your files are organized into folders such as:
frames/
scene_01/
scene_02/
scene_03/
The images are sorted using their relative folder paths and filenames. Leave this option disabled when you only want files directly inside the selected folder.
Forward and reverse order
By default, images are loaded from the first file to the last file.
Enable reverse to process them in the opposite order. This can be useful when:
- You want to review the newest or highest-numbered frames first.
- You need to work backward through a sequence.
- You are comparing results in reverse order.
Reset to start
Reset to start moves the sequence back to the first image in the current ordering.
Use it when:
- You want to process the folder again.
- You changed the file type and want to begin with the first matching file.
- You want Queue all to start with the complete folder.
- You are unsure where the current position is.
Previous and Next
Prev and Next change the selected position without running the workflow.
This lets you move through the folder manually before queuing. You can use these controls to skip an image, return to an earlier file, or preview the next part of a sequence.
Status and scrub bar
The status area shows the next image position and filename, for example:
Next: 3 / 240 · frame_003.png
The status area also works as a scrub bar:
- Click at a position to jump to that part of the folder.
- Click and drag left or right to move through the sequence.
- The filled portion shows how far through the folder you are.
This is faster than pressing Next repeatedly when working with a large folder.
Hold last
Hold last freezes the image that was loaded by the previous run.
While this hold is active, each queue re-emits the same image instead of advancing. This is useful when you want to adjust the rest of your workflow while keeping the input image unchanged.
Select Resume to continue the sequence from its previous position.
Hold next
Hold next freezes the upcoming image.
The next queue continues to use that same upcoming image until you select Resume. This is useful when you have located a specific frame and want to test several workflow settings with it.
A hold also cancels an active Queue all sequence. While a hold is active, other sequence controls are disabled to prevent accidental movement.
Rescan
Rescan reads the folder again and updates the list of matching files.
Use it after adding, removing, or renaming images in the selected folder. If you change the file type during a run, resetting the sequence afterward is recommended so that you start from the beginning of the new file list.
Current and Next previews
The node displays two thumbnail previews:
- Current shows the image loaded by the most recent run.
- Next shows the image that the next queue will load.
The Current preview remains empty until at least one queue has been run. These previews help you confirm that the sequence is moving as expected.
Remembered folder
Newly added nodes pre-fill the folder most recently used in that browser.
This remembered folder is stored in the browser's local storage. It is specific to the browser and machine being used. A node loaded from a saved workflow keeps the directory saved in that workflow instead.
Outputs
The node provides the following outputs:
| Output | Type | Description |
|---|---|---|
image | IMAGE | The loaded image as an RGB image in ComfyUI format. Images are EXIF-rotated when needed. |
mask | MASK | A mask from the image's alpha channel. It follows the inverted alpha behavior used by ComfyUI's standard Load Image node. Images without alpha receive a zero mask. |
filename | STRING | The name of the loaded file, without its folder path. |
index | INT | The zero-based position of the image used for the current run. |
total | INT | The number of matching images found in the folder. |
file_path | STRING | The absolute path of the loaded file. |
You can connect image and mask to your normal image-processing workflow. The other outputs can be used when you want to label results, track frame numbers, or include file information in downstream nodes.
Troubleshooting ComfyUI-SequentialImageLoader
The node keeps loading the same image
Check whether Hold last or Hold next is active. A hold intentionally prevents the sequence from advancing.
Select Resume, then queue the workflow again.
Also check that the node is receiving a new queue request. The sequence advances when a prompt is queued, not simply when the node is selected or viewed.
The first image is not the one I expected
The node may have retained its previous position.
Select Reset to start before queuing again. If reverse is enabled, remember that the first image will be the last file in normal forward order.
The file list does not include a newly added image
Select Rescan after adding, removing, or renaming files.
Also verify that:
- The image extension is supported.
- The selected
filetypeincludes that extension. - The image is in the selected folder.
include_subfoldersis enabled if the image is inside a subfolder.
Queue all starts in the middle of the folder
Queue all continues from the current position; it does not automatically rewind.
Select Reset to start, then select Queue all to process the entire folder from the beginning.
Queue all does not continue
Queue all stops when:
- The final matching file has been processed.
- You select Stop queueing.
- The workflow is interrupted.
- A processing error occurs.
- A hold is activated.
Resolve any workflow error, select Resume if necessary, and start Queue all again from the desired position.
The folder contains images, but the node finds none
Confirm that the directory path points to the folder visible to the ComfyUI server. The folder picker can help verify the server's filesystem location.
Then check the file type setting. For example, a folder containing JPEG files may not show any files when filetype is set to png.
Changing the file type gives an unexpected position
The current index number is retained when the file list changes. If the new file type produces fewer files, the position may wrap within the new list.
Select Reset to start after changing filetype to begin cleanly with the first matching image.
The image order looks incorrect
The node uses natural sorting, so numbered names are ordered as people normally expect. Subfolder searches are sorted by relative path and filename.
If the order is still unexpected, check the complete filenames and folder structure. Files with different prefixes or folder paths may sort before or after the files you are comparing.
Can I process every image as one batch?
No. This node intentionally loads one image per run.
Use it when you want controlled, one-at-a-time processing. A separate batch-oriented workflow or node is needed when all images must be loaded as one batch tensor in a single run.
Where is the current position stored?
The position is stored as widget state on the node and is saved with the workflow JSON. Reopening a saved workflow can therefore resume from the saved position.
External or headless tools that run the workflow use the index saved with the workflow rather than the position from a separate interactive browser session.
Learn More about ComfyUI-SequentialImageLoader
The extension's source code, issue tracker, and project documentation are available on GitHub.
For practical use, the most useful workflow is to:
- Start with a small folder of a few images.
- Connect the node's
imageoutput to the same place where you would normally connect a standard image loader. - Queue once and confirm the Current and Next previews.
- Use Next, Prev, or the scrub bar to test different positions.
- Use Reset to start before processing a complete folder.
- Try Queue all only after confirming that the workflow produces the expected result for one image.
