Nodes/ComfyUI Instant Reference/Instant Reference Load Images In Folder
ComfyUI Node

Instant Reference Load Images In Folder

Skip the tedious drag-and-drop

By cstria0106·Created 6 months ago·Updated 5 months ago· 8
Instant Reference Load Images In Folder
    • images
    • image_paths
    folder_path
    recursivefalse
    max_images0
    resize_to_firsttrue

    A boring little loader that turns a folder of reference images into the IMAGE batch the rest of this pack eats. You give it a directory path, it reads the images in it, and out comes a stacked tensor plus a list of the file paths. That's the whole job, and it's genuinely useful because feeding 12 reference images into Instant Reference LoRA by hand-dragging them every time is exactly the kind of friction this pack exists to remove.

    Point it at a folder, wire images into a training node, and the workflow becomes "drop files into a directory, hit run." Same job the built-in Load Image does one image at a time, but in bulk.

    Inputs

    • folder_path - a string, the directory to scan. This is the only one you must set.
    • recursive - whether to also scan subfolders. Default off.
    • max_images - a cap on how many images to load. Default 0 means no limit. If you're training, this is your accidental-dataset guard: 5 or 10 keeps you honest.
    • resize_to_first - default on. If the folder has mixed sizes, it resizes everything to match the first image (LANCZOS). Turn it off and mixed sizes become an error instead.

    Outputs

    • images - the IMAGE batch, all frames stacked into one tensor. Wire this into Instant Reference LoRA or Instant Reference LoRA Train.
    • image_paths - a string with the resolved paths, one per line. Handy for a quick "which files did I actually load" check, or as text you can stash in a workflow note.

    Install

    ComfyUI Manager → search "Instant Reference" → install → restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/cstria0106/comfyui-instant-reference
    

    Notes

    This node does no captioning, no training, and no model downloads - it's pure image IO, so it shares none of the pack's first-run heaviness. Two small things worth knowing: the folder path is a plain filesystem path (no ComfyUI-specific folder picker widget here), and if resize_to_first is off, mismatched dimensions will raise an error that tells you exactly that - at which point you either turn it on or fix your folder. For reference training, resizing to the first image is usually the right call anyway; a consistent dataset is a happy dataset.

    CategoryInstant Reference

    Inputs (4)

    NameTypeDefaultDescription
    folder_pathSTRING
    recursiveBOOLEANfalse
    max_imagesINT00–10000
    resize_to_firstBOOLEANtrue

    Outputs (2)

    NameTypeDescription
    imagesIMAGE
    image_pathsSTRING