Nodes/Orion4D_MetaNode/πŸ“‚ Folder File Max
ComfyUI Node

πŸ“‚ Folder File Max

A Whole File Explorer Inside a Node (with Thumbnails)

By orion4dΒ·Created 5 months agoΒ·Updated 5 months agoΒ· 5
πŸ“‚ Folder File Max
    • file_path
    • filename
    • dir_used
    • files_json
    • file_info
    • IMAGE
    • index_out
    β—„directoryinputβ–Ί
    β—„extensionsβ–Ί
    β—„name_regexβ–Ί
    β—„regex_modeincludeβ–Ί
    β—„regex_ignore_casetrueβ–Ί
    β—„sort_bynameβ–Ί
    β—„descendingfalseβ–Ί
    β—„seed_modemanualβ–Ί
    β—„index0β–Ί
    β—„load_imagefalseβ–Ί
    β—„image_modeRGBβ–Ί

    The default way to load an image in ComfyUI is a dropdown of files. πŸ“‚ Folder File Max replaces that with a full visual file explorer - grid or list view, thumbnails generated on the fly, regex filtering, sorting, a lightbox, and even an "Explore" button that opens the folder in your OS. For anyone cycling through hundreds of reference images or batch outputs, this is the node that makes ComfyUI feel like a real tool instead of a file picker.

    The selection machine. The inputs read like a filesystem query. directory (default input) points at a folder; extensions filters by extension; name_regex with regex_mode (include/exclude) and regex_ignore_case narrows by name pattern. sort_by (name/mtime/size) with descending orders the list. Then seed_mode decides how you pick from it: manual (use index), fixed, increment, decrement, or randomize - so you can have a node that walks through a folder on every run, or picks a new random reference each time. load_image (with image_mode of RGB, RGBA, or a 512px preview) decides whether it also decodes the file into an IMAGE output.

    Outputs - this is the star. file_path (absolute path to the file - the one you'll actually wire to loaders), filename, dir_used, files_json (a JSON list of the folder contents), file_info (metadata about the picked file), IMAGE (the decoded image when load_image is on), and index_out (which index got picked, for feedback loops). So one node can both feed an image into a pipeline and tell a save node exactly where to write a sibling file.

    The security model matters, read this. Because this node exposes HTTP routes on your ComfyUI server, the author locked it to an allow-list of roots: {COMFY}/input, output, temp, and models by default. Anything outside is silently refused - empty outputs, reason logged to the console. You extend the allow-list by setting the ORION4D_FOLDER_ROOTS environment variable before launching ComfyUI (;-separated on Windows, : on Linux/macOS). The code also rejects .. traversal, serves only media extensions to the browser, and blocks junction points that escape a root. Don't expose ComfyUI to the internet with personal folders in that list - every client who can reach the port can browse them.

    Where people get burned: the silent refusal is the top one - a path outside the roots returns empty results with only a console message, which reads as "broken node" until you check the log. And remember directory is just a string widget; it's resolved against the allow-list, not free-form.

    Install. ComfyUI Manager β†’ search "Orion4D_MetaNode", or clone https://github.com/orion4d/Orion4D_MetaNode into custom_nodes/ and restart. Category: Orion4D_MetaNode/Loaders. No extra Python deps.

    If you've ever spent a whole session typing filenames into text fields, this node pays for itself in an afternoon.

    CategoryOrion4D_MetaNode/Loaders

    Inputs (11)

    NameTypeDefaultDescription
    directorySTRINGinputβ€”
    extensionsSTRINGβ€”
    name_regexSTRINGβ€”
    regex_modeCOMBOinclude2 options: include, exclude
    regex_ignore_caseBOOLEANtrueβ€”
    sort_byCOMBOname3 options: name, mtime, size
    descendingBOOLEANfalseβ€”
    seed_modeCOMBOmanual5 options: manual, fixed, increment, decrement, randomize
    indexINT00–1000000000β€”
    load_imageBOOLEANfalseβ€”
    image_modeCOMBORGB3 options: RGB, RGBA, preview 512px

    Outputs (7)

    NameTypeDescription
    file_pathSTRINGβ€”
    filenameSTRINGβ€”
    dir_usedSTRINGβ€”
    files_jsonSTRINGβ€”
    file_infoSTRINGβ€”
    IMAGEIMAGEβ€”
    index_outINTβ€”