Nodes/ComfyUI-ZFRNodes/Reference Image Loader
ComfyUI Node

Reference Image Loader

Upload reference images inside the node — no Load Image chains

By zfrsgtcu·Created 3 months ago·Updated 2 months ago· 31
Reference Image Loader
    • batch
    • image_1
    • image_2
    • image_3
    • image_4
    • image_5
    • image_6
    • image_7
    • image_8
    • count
    images[]
    output_modebatch

    Reference Image Loader is the pack's answer to one of the dullest parts of multi-reference workflows: wiring up a row of Load Image nodes and managing eight separate outputs. Here you hit an "⬆ Upload images" button inside the node itself, pick one or several files (up to 8), and get them back as a single IMAGE batch, ready to feed the multi-reference generators in the same pack.

    It exists because of how the pack's generators evolved. Simple Image Generator (Multiple) and Story Frame Generator both take a batched reference_images input - one wire, not a slot per image. This loader is the natural companion: upload your references, reorder or remove them in a compact thumbnail table, and connect the single batch output straight in.

    What you get

    • batch - all loaded images as one IMAGE tensor.
    • image_1 through image_8 - individual outputs, available depending on your output mode.
    • count - how many images are loaded.

    The output_mode select (Single Batch, Separate Images, or Batch + Separate) controls which slots appear. The frontend hides the ones you're not using.

    The nice detail is how it handles mixed sizes: different-sized images are combined without cropping or stretching - they're letterboxed onto a consistent canvas, so the batch stays valid as one tensor and nothing gets squashed. That pairs well with the generators' aspect-preserving reference sizing, which is where the multi-reference edit path wants to be.

    The restart gotcha (read this first)

    The upload button, thumbnail table, and reordering UI are all added by a frontend script (web/zfrnodes.js), not by ComfyUI core. That means this node demands a full ComfyUI restart after you install or update the pack - a browser refresh will not make the upload button appear. If you add the node and it looks like a plain text field with no button, you skipped the restart.

    Install

    Via ComfyUI Manager (search "ComfyUI-ZFRNodes") or:

    cd /path/to/ComfyUI/custom_nodes
    git clone https://github.com/zfrsgtcu/ComfyUI-ZFRNodes.git
    

    Then restart ComfyUI completely. Requirements are just numpy, torch, and Pillow - no model downloads, no API keys. It's a pure input node: it loads, batches, and outputs.

    Typical wiring, per the pack README: Reference Image Loader → Simple Image Generator (Multiple) (reference_images), or → Story Frame Generator (reference_images) for identity-locked stories. If you're feeding a contact sheet from Sheet Compositor into the story path, this loader is how it gets in - or you can connect the sheet's IMAGE output directly, since both are IMAGE types. The loader just makes the uploading part pleasant.

    Categoryzfr-nodes

    Inputs (2)

    NameTypeDefaultDescription
    imagesSTRING[]
    output_modeCOMBObatch3 options: batch, separate, both

    Outputs (10)

    NameTypeDescription
    batchIMAGE
    image_1IMAGE
    image_2IMAGE
    image_3IMAGE
    image_4IMAGE
    image_5IMAGE
    image_6IMAGE
    image_7IMAGE
    image_8IMAGE
    countINT