Nodes/ComfyUI-AusBoss/Image Folder πŸ†Ž
ComfyUI Node

Image Folder πŸ†Ž

Run one workflow over 200 pictures without queueing 200 times

By ausbossΒ·Created 3 months agoΒ·Updated about 11 hours agoΒ· 107
Image Folder πŸ†Ž
    • image
    • mask
    • filename
    • index
    • count
    β—„sourceinputβ–Ί
    β—„folderβ–Ί
    β—„subfoldersfalseβ–Ί
    β—„sortnameβ–Ί
    β—„picturesβ–Ί
    β—„runall in one runβ–Ί
    β—„position1β–Ί
    β—„after_runnextβ–Ί
    β—„at_the_endstop the runβ–Ί

    Batch work in ComfyUI has always been the awkward part. Core gives you Load Image, which loads the image - one, selected in a widget, re-picked by hand every time. If you want a workflow to chew through a folder of 200 product shots, you either queue 200 runs or go install a whole automation pack. Image Folder is the small tool for that job: point it at a folder, tick the pictures, press Run.

    How it works

    It's a loader that hands downstream nodes a list. That's the mechanism, and it's why it feels different from most loaders: the node emits image and mask as list outputs, so everything you wire up after it runs once per picture, automatically, inside a single press of Run. The filename, index and count outputs come along per picture too (count is the one non-list output - how many you picked).

    Two run modes, and this is the choice that matters:

    • All in one run - one press processes every ticked picture.
    • One per run - each press loads one picture and steps to the next by itself. Slower to babysit, but if one picture blows up, only that one dies instead of taking the batch with it. That's the mode you want when you're testing a workflow on unfamiliar images.

    The rest of the inputs are exactly what the tooltips say they are. source picks ComfyUI's input or output folder; folder is the folder inside it (empty means the folder itself); subfolders includes nested folders; sort orders by name or modification time. pictures holds the ticked selection - leave it empty and you get every picture in the folder. It reads images, and it caps the listing at 5000 files, beyond which the gallery tells you it's truncating.

    In one-per-run mode, position is which picture the next run loads, after_run decides what happens after a run is queued (next, stay, random), and at_the_end chooses between stopping with a message and looping back to the first. That last pair is what makes it usable as a slow drip through an overnight queue.

    The mask output does the same thing core Load Image does: white where the picture is see-through. A JPEG with no alpha gives you the same empty stand-in mask core hands out, so existing inpainting wiring doesn't break.

    The one bit of wiring that earns its keep

    Wire filename into a Save Image node's filename input and your outputs keep the input names - product_0341.png in, product_0341.png out, no counters to untangle. That single connection is the difference between a usable batch pipeline and an afternoon of renaming files.

    Install

    It's one node in ComfyUI-AusBoss. Search AusBoss in ComfyUI Manager's Custom Nodes Manager, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ausboss/ComfyUI-AusBoss.git
    

    Restart ComfyUI afterwards. comfy node install ausboss-nodes does the same thing through comfy-cli. No extra pip packages, no model downloads - the pack uses ComfyUI's own Pillow, NumPy, Torch and PyAV. The pack does require ComfyUI 0.27.1 or newer, so an old install will get refused by Manager.

    Where people get burned

    It only reads inside ComfyUI's input and output folders, and that's deliberate. A folder somewhere else on your disk isn't a config problem you can solve with a path - the node resolves every folder below those two roots and refuses anything that escapes. The supported move is to browse to the folder, drop it on the node or add it, and let the node copy the pictures into input. A genuinely huge folder asks before copying.

    Then restart the run, not just the graph. With one-per-run, forgetting to press Run means you queue the same picture again - the position only advances when a run is queued. If "next" isn't moving, check after_run before you start blaming caching.

    Watch what the index tells you. index counts from 1 among the picked pictures, not the folder, so it won't match a file number. If you need the position, use it against count; for anything stable, use filename.

    For bigger automation - detectors, detail loops, per-region re-renders - Impact Pack is still the pack people reach for, and its detector-plus-detailer loop is the canonical batch pipeline. Image Folder isn't competing with that. It's the missing loader underneath it.

    CategoryπŸ†Ž AusBoss/Image

    Inputs (9)

    NameTypeDefaultDescription
    sourceCOMBOinputWhich of ComfyUI's folders to look in: input (pictures you put there) or output (pictures you made).
    folderSTRINGThe folder inside it. Empty is the input or output folder itself. Browse lists the folders there.
    subfoldersBOOLEANfalseAlso take the pictures in the folders inside this one.
    sortCOMBOnameThe order of the pictures: by name, or by when the file was last changed.
    picturesSTRINGThe picked pictures. Tick them on the node. Empty means every picture in the folder.
    runCOMBOall in one runAll in one run: one press of Run does every picked picture. One per run: each run loads one picture and steps on, so a picture that fails only skips itself.
    positionINT11–1000000With one per run: which of the picked pictures the next run loads, counted from 1.
    after_runCOMBOnextWith one per run: next moves Picture on by one each time a run is queued, so queuing several runs walks the folder. Stay keeps loading the same picture. Random jumps to any of the picked ones.
    at_the_endCOMBOstop the runWith one per run, after the last picture: stop the run with a message, or start over at the first.

    Outputs (5)

    NameTypeDescription
    imageIMAGEEach picked picture, one at a time. What comes after runs once for each.
    maskMASKWhite where the picture is see-through. A picture with no see-through part gives the same empty mask core Load Image does.
    filenameSTRINGThe picture's file name without its ending. Wire it to Save Image's filename and the result keeps the name.
    indexINTThe picture's number among the picked ones, counted from 1.
    countINTHow many pictures are picked.