Nodes/Dir Gir/GIR Image (Path) Nabber
ComfyUI Node

GIR Image (Path) Nabber

Load exactly the file Loopy Dir points at

By AshMartian·Created 3 years ago·Updated about a year ago· 31
GIR Image (Path) Nabber
    • image
    file_path

    The classic folder-loop failure goes like this: you wire current_index from a loop node into a loader, and the images come back out of order, or wrong, or duplicated - because the loader has its own idea of how to filter and index the folder, and it doesn't match yours. GIR Image Nabber is the fix from the Dir Gir pack, and it's almost aggressively simple: you give it a full file path, it loads that exact image. No filtering. No index math. No opinions.

    The README is refreshingly blunt about why this node exists: LoadImagesFromPath ships its own built-in directory filtering and index logic, which stops lining up with GIR Loopy Dir's filtered indexes the moment you use regex. Nabber sidesteps that entire class of mismatch. The path is the path.

    How it works

    One input - file_path, a string (it's marked forceInput, so wire it from GIR Loopy Dir's current_file_path output). One output - image, a standard IMAGE tensor. Under the hood it's a small PIL pipeline: open the file, apply exif_transpose so phone photos come out the right way up, convert to RGB, scale to 0–1 floats, and wrap it in a batch dimension. That's the same shape ComfyUI's built-in Load Image produces, so the result plugs into anything downstream - VAE encode, img2img, ControlNet preprocessing, whatever your graph does.

    It raises a clear error if the file doesn't exist (FileNotFoundError), and a non-image file will fail on the PIL open. So point it at real files.

    The workflow it's for

    GIR Loopy Dir → current_file_pathGIR Image Nabber → rest of your pipeline. Because Loopy Dir advances one file per execution, that chain gives you the thing people actually want: run a whole folder through the same graph, one image at a time, in a clean order. Queuing beyond the file count is fine - Loopy Dir wraps, and Nabber just loads whatever path it's handed.

    It loads anything PIL can open - PNG, JPG, WebP - but it is not a video loader. For frames or videos, the README explicitly points you to VHS Load Video (Path) instead. Don't fight that; use the right tool.

    Install

    Same pack, same one-time setup. ComfyUI Manager, search Dirgir; or:

    cd Your_ComfyUI_Path/custom_nodes
    git clone https://github.com/AshMartian/ComfyUI-DirGir
    

    Then restart ComfyUI. No models, no heavy dependencies - the only extra is tkinter, which the pack attempts to auto-install at startup (needed by the picker node, not really by this one).

    Verdict

    There's nothing glamorous here, and that's the compliment. Nabber is a boring, single-purpose node that removes one specific, maddening failure mode - the loader whose indexing disagrees with your loop. Sometimes the boring node is the one that saves your evening. If you're using Loopy Dir for folder batches, just add it; it's the piece that makes the whole thing behave.

    Categoryimage

    Inputs (1)

    NameTypeDefaultDescription
    file_pathSTRING

    Outputs (1)

    NameTypeDescription
    imageIMAGE