Nodes/ComfyUI-Loopchain/FolderToImageStorage
ComfyUI Node Runs on cloud

FolderToImageStorage

Skip the import nodes, just point at a folder

By Fannovel16·Created 3 years ago·Updated 3 years ago· 31
FolderToImageStorage
  • pipeline
    key
    folder

    If ImageStorageImport is the "collect one frame at a time" path into the pack's storage, FolderToImageStorage is the bulk loader: drop a folder of images into ComfyUI's input directory, pick it from a dropdown, and the whole folder lands in a named storage bucket in one run. This is the entry point the README actually uses - its example workflow loads two head images from a folder called heads this way and runs them through a keyframe loop.

    How it works

    The folder input isn't a text box you type a path into - it's an enum populated from the subfolders currently inside ComfyUI/inputs. So the first step is making a folder there:

    mkdir -p ComfyUI/inputs/heads
    # drop your keyframes in: head0.png, head1.png, ...
    

    Then on the node, pick heads from the dropdown. On execution it scans that folder for image files (png, jpg, webp, gif, tiff, bmp and friends), sorts them alphabetically, applies EXIF transposition, converts each to an RGB float tensor, and stores them all under your key. It also reads the alpha channel if present and stores it as an inverted mask on the side - handy if your keyframes come with transparency.

    The inputs

    • key - the storage bucket name the images land in. Case-sensitive, remember it for the export side.
    • folder - the dropdown of input subfolders. Only folders that existed when the node was created/refreshed show up; if yours is missing, create the folder and reload the node (or restart ComfyUI).
    • pipeline - optional LOOPCHAIN_PIPELINE input for chaining into a loopchain.

    It's an output node with no outputs. Give it a key and a folder, hit its Queue button, and the frames are staged.

    Gotchas

    It asserts the folder contains at least one image - an empty folder just errors. Filenames are sorted, so name your frames frame_01.png, frame_02.png if the order matters, or you'll get frame_10 before frame_2. And the storage is in-memory as always: it lives for the current ComfyUI session and evaporates on restart, so export and reset must run in the same session.

    This is Fannovel16's ComfyUI-Loopchain, the same author as the essential comfyui_controlnet_aux, but an older, dormant experiment (last commit December 2023). Install is trivial - ComfyUI Manager, search "ComfyUI-Loopchain", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Fannovel16/ComfyUI-Loopchain
    

    Restart, and you're ready. No pip deps, no model files - the only extra the README wants for its full example is ComfyUI-Frame-Interpolation for smoothing the looped output.

    CategoryLoopchain/storage

    Inputs (3)

    NameTypeDefaultDescription
    keySTRING
    folderCOMBO1 options: 3d
    pipelineoptLOOPCHAIN_PIPELINE

    Outputs (0)

    No outputs