ComfyUI Node

Select Folder

Point at a folder with a real OS dialog, and hand the path to the graph

By acgc99·Created 26 days ago·Updated a day ago· 0
Select Folder
    • folder
    folder

    The node that's really a button

    Select Folder looks like nothing - one string in, one string out - and on the backend, that's basically all it is. The point isn't the node, it's the Select Folder button the pack's frontend adds to it. Click it, get your operating system's actual folder dialog, pick a directory, and the chosen path lands in the widget. From there the node just passes the string through to the folder output, ready to wire into anything that takes a path.

    How the dialog actually works

    This is where the pack earns its keep, because ComfyUI has no cross-platform folder picker built in. The button calls a small HTTP route on your ComfyUI server (/acgc99/select-folder), and the server spawns whatever native tool your OS provides, in fallback order:

    • Windows - PowerShell's FolderBrowserDialog
    • macOS - osascript (AppleScript's "choose folder")
    • Linux - kdialog on KDE/Plasma, otherwise zenity

    If the first choice isn't installed or fails, it moves to the next; if none exist, you get an error and have to type the path yourself.

    That Linux line is the real gotcha. Windows and macOS ship their picker tools with the OS, so those just work. A headless server or a minimal Linux install without zenity or kdialog has nothing to open - the button fails until you install one (sudo apt install zenity on Debian/Ubuntu, or kdialog on KDE systems) and reload the tab.

    Where it fits

    The author built this to feed a folder path into Load Image For Loop from ComfyUI-Easy-Use, and it works the same way for the pack's own loaders. Note that Load Image (from Any Folder) and Load Image Serially (from Folder) each carry their own Select Folder button already, so you mainly reach for this standalone node when a third-party node takes a raw folder string.

    One subtlety worth knowing: the serial node's Queue Folder button reads the folder path directly from a connected Select Folder node rather than from its own widget - in fact it errors if you wire the folder input from anything else. So wiring Select Folder into the serial loader isn't just convenient, it's the arrangement the frontend expects, and it's why the author pairs them.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/acgc99/ComfyUI-acgc99-pack.git
    

    or search ComfyUI-acgc99-pack in ComfyUI Manager, restart ComfyUI, and fully reload the browser tab - the button is frontend JS, and a stale tab silently won't show it. No pip dependencies, no models. The only "dependency" is the optional system picker tool on Linux.

    It's the rare node whose value is almost entirely the UI around it: a native folder dialog in a web interface that would otherwise make you hand-type absolute paths - which nobody gets right on the first try, least of all people running a queue of four hundred files at once.

    Categoryacgc99

    Inputs (1)

    NameTypeDefaultDescription
    folderSTRING

    Outputs (1)

    NameTypeDescription
    folderSTRING