Nodes/ComfyUI DCI/Directory Loader
ComfyUI Node

Directory Loader

Load every .dci in a folder at once

By zccrs·Created about a year ago·Updated 11 months ago· 2
Directory Loader
    • Binary Data List
    • Relative Paths
    • Image List
    • Image Relative Paths
    • Skipped Files
    Directory Path
    File Filter*.dci
    Include Subdirectoriestrue
    Skip Symlinkstrue

    The Binary File Loader handles one file. This node handles the whole folder. Directory Loader scans a directory (recursively, if you want), picks out every file matching a glob filter, and loads them all into the pack's batch data types - binary data lists, relative paths, and any image files it can decode along the way.

    This is the batch front door for icon pipelines: point it at a folder full of generated .dci archives (or just images, since the filter is a glob you control) and it hands you everything in one shot, ready for the preview, analysis, or saver nodes that accept lists.

    Inputs (all required):

    • Directory Path - the folder to scan. A blank or nonexistent path returns empty lists rather than crashing.
    • File Filter - default *.dci. It's a glob, and it supports multiple patterns separated by commas or semicolons (*.dci,*.png). Change it to * if you want everything.
    • Include Subdirectories - default on; scans recursively using a breadth-first walk, skipping permission-blocked folders with a warning.
    • Skip Symlinks - default on. DCI universal-tone archives lean on symlinks, and following them during a directory scan can loop or duplicate. If you're scanning a tree that legitimately wants its symlinks loaded, turn this off - anything skipped gets reported in the Skipped Files output.

    Outputs (five of them):

    • Binary Data List - every matching file's raw bytes.
    • Relative Paths - each file's path relative to the scan root, aligned index-for-index with the binary list.
    • Image List - an IMAGE tensor batch of any matching files that decode as images (jpg/png/webp/bmp/gif/tiff/ico). Non-images are just skipped.
    • Image Relative Paths - paths for the decoded images, aligned with the Image List.
    • Skipped Files - the symlinks (or anything else) that were skipped, so you can see what you're missing.

    The alignment matters: Binary Data List[i]Relative Paths[i], and Image List[i]Image Relative Paths[i]. Keep the paired outputs together when you route them.

    Installing

    Part of comfyui-dci - Pillow and numpy, no models:

    cd ComfyUI/custom_nodes
    git clone https://github.com/zccrs/comfyui-dci
    cd comfyui-dci && pip install -r requirements.txt
    

    Or ComfyUI Manager → "DCI Image Export Extension" → restart. Under DCI / Files.

    Where people get burned

    • Glob filters apply to the filename, not the path. A filter like *.dci matches .dci files at any depth once recursion is on - you can't write sub/*.dci here. If you need per-directory control, keep Include Subdirectories off and scan each folder separately.
    • Skipped symlinks default on. If you load a folder of freshly packaged universal-tone icons and get fewer files than expected, this is why - check the Skipped Files output.
    • Image decoding is best-effort. Files matching an image extension but failing to decode are dropped from the image lists silently; they're still in the binary lists, so nothing is lost.

    When you're processing a theme folder in bulk instead of one hand-tuned icon at a time, this node is where the pack stops feeling like a toy and starts feeling like a tool.

    CategoryDCI/Files

    Inputs (4)

    NameTypeDefaultDescription
    Directory PathSTRING
    File FilterSTRING*.dci
    Include SubdirectoriesBOOLEANtrue
    Skip SymlinksBOOLEANtrue

    Outputs (5)

    NameTypeDescription
    Binary Data ListBINARY_DATA_LIST
    Relative PathsSTRING_LIST
    Image ListIMAGE
    Image Relative PathsSTRING_LIST
    Skipped FilesSTRING_LIST