Folder Queue Manager
Process a folder of subfolders while you go do something else
- full_path
- foldername
ComfyUI's auto-queue will happily run your workflow forever - the problem is making the workflow know what to do differently on each run. If your jobs are organized as folders, Folder Queue Manager is the piece that turns a single workflow into an unattended batch processor: it walks the subfolders of a path, one per run, and hands you the path and name of the current one. Point your loaders and savers at those outputs, hit auto-queue, and each run picks up the next folder.
This is classic plumbing - the "queue" category, the node-plumbing layer that doesn't touch pixels but makes the graph do work at scale. If you've ever sat at a keyboard re-running a workflow and manually changing an input for each item in a list, this is the node that retires that chore.
How it works
On each execution it lists the contents of path, filters to directories, and sorts them naturally - the numeric-aware sort that puts folder2 before folder10, which is exactly what you want when your folders are numbered. Then it returns the folder at index. That's it. No state stored, no files touched - the node is pure, and the index is the whole control surface.
The trick that makes it a queue is how you drive index. ComfyUI's widgets have a control_after_generate setting. Set the index widget to increment, turn on auto-queue, and every run bumps the index by one while the node hands back the next folder. That one-two - a pure selector node plus the increment-after-generate behavior - is the entire pattern, and it's the same trick every "queue manager" node in this pack uses.
The inputs and outputs
index- which folder to return (0-based, default 0).path- the directory to scan.
Outputs:
full_path- the absolute path to the selected subfolder. Feed this to anything that loads from a path.foldername- just the folder's name, for naming outputs or display.
If index runs past the end of the folder list, both outputs come back empty - so a job with fewer folders than runs just silently returns nothing. That's usually fine (the workflow downstream should tolerate an empty path), but it's worth knowing if you're scripting around it.
Install
From the Quasimondo pack - ComfyUI Manager → search ComfyUI-QuasimondoNodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Quasimondo/ComfyUI-QuasimondoNodes
cd ComfyUI-QuasimondoNodes
pip install -r requirements.txt
The node itself is pure Python - it doesn't even need the pack's OpenCV or moderngl dependencies. No models.
Where people get burned
The main failure mode is forgetting to set control_after_generate on the index widget. Without it, the index stays fixed and auto-queue just re-runs the same folder forever - which looks like the node is broken when really it's the widget doing exactly what it was told. Set it to increment (or wire index from a counter node).
Second, sorting is by natural filename order - if your folders have non-numeric names, that's just alphabetical, and "the folder I want" may not be "the next folder." Name things so the natural sort matches the order you want to process them. And one more: this node selects folders only - for iterating files or frames inside a video, that's its sibling, Video Queue Manager.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| index | INT | 00–9007199254740991 | — |
| path | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| full_path | STRING | — |
| foldername | STRING | — |