Nodes/ComfyUI-FileHub/File Hub Loader
ComfyUI Node

File Hub Loader

Stop juggling three load nodes — File Hub Loader reads input/, output/, and temp/ from one canvas

By redswoop·Created 4 months ago·Updated 4 months ago· 0
File Hub Loader
    • image
    • mask
    • path
    • kind
    selection{}

    The stock ComfyUI loader only reads one place. LoadImage pulls from input/, and if you want something you generated last run - which lives in output/ - you either swap in a "load from output" node or download and re-upload it. File Hub Loader, from the ComfyUI-FileHub pack, kills that whole dance: one node whose UI browses all three directories - input/, output/, and temp/ - plus pins for the files you flip between constantly.

    What you're actually getting

    The node is mostly a frontend. Open it and you get four pin slots (files you want at hand), a recents row (six latest files in the active source directory, auto-refreshed after every run), and source tabs (input · output · temp) that decide which directory the recents and the browse modal show. The browse modal is the real workhorse: thumbnail grid, name/mtime sort, search, subfolder navigation, pagination - it handles a directory with thousands of PNGs without choking. Drag a file from your desktop onto a pin and it uploads to input/, where it survives. That's the quiet killer feature: stock LoadImage's upload widget dumps into temp/, and your file is gone the next time you swap it. Here it lands in input/ and stays.

    Right-click a pin for the context menu - replace from filesystem, browse, promote to input/, soft-delete, unpin.

    How it works

    Don't let the fancy UI fool you; the backend is small and honest. The canvas-rendered interface writes a JSON blob into a hidden selection string widget, and the Python side just parses whatever file is currently active and loads it. Pin state rides along in that same widget, so it serializes into the workflow JSON and your pins survive save/load. The loader mirrors stock LoadImage for images - EXIF-transposed, alpha extracted into a mask - and guards against path traversal the same way core's /upload/image does.

    The inputs and outputs that matter

    There's exactly one input, selection (STRING, default "{}"), and it's hidden - you never type into it. What you wire out:

    • image (IMAGE) - the loaded image
    • mask (MASK) - alpha channel as a mask
    • path (STRING) - absolute path of the loaded file
    • kind (STRING) - image, video, audio, or other

    Here's the thing most people miss: for video and audio files the node does not decode anything. It hands you an empty 64×64 placeholder image plus the path, and you feed that path to a video or audio node downstream (VHS, or similar). It's a file manager with image decoding bolted on, not a media player. If nothing is selected you get the placeholder and an empty path, which is fine - the node validates clean while you're still picking.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/redswoop/ComfyUI-FileHub.git
    

    Restart ComfyUI and search the node menu for "File Hub Loader" (or grab it via ComfyUI Manager - search "ComfyUI-FileHub"). No extra Python dependencies, no model files. ffmpeg on PATH is optional and only buys you real video thumbnails instead of an icon.

    Where people get burned

    • The recents row shows output/, and output/ gets huge. Pagination saves the browse modal, but the recents only show the latest six, so don't go hunting for that 400th image there - use the browse modal.
    • Pin state can go stale. Since the pins live in the workflow JSON, they're keyed to filenames. If you delete the file on disk, the loader throws "selected file not found or invalid" until you re-pin something.
    • It's a newer pack. Tested against ComfyUI 0.19.x with frontend 1.42.x. If you're on an older ComfyUI, the canvas-rendered UI may not render right - update before you file a bug.
    Categoryimage

    Inputs (1)

    NameTypeDefaultDescription
    selectionSTRING{}

    Outputs (4)

    NameTypeDescription
    imageIMAGE
    maskMASK
    pathSTRING
    kindSTRING