Nodes/ComfyUI-H3-Multishot/H3 Ref Folder (up to 9 separate refs)
ComfyUI Node

H3 Ref Folder (up to 9 separate refs)

Nine reference images from a folder, no LoadImage spaghetti

By jlucasmcrell·Created 21 days ago·Updated 2 days ago· 31
H3 Ref Folder (up to 9 separate refs)
    • ref_1
    • ref_2
    • ref_3
    • ref_4
    • ref_5
    • ref_6
    • ref_7
    • ref_8
    • ref_9
    • count
    • picked
    refs_root
    pickfirst_n
    seed0
    max_refs3
    character

    H3 Ref Folder is the load-everyone-at-once node: point it at a folder of character plates and it emits up to nine separate reference images, one per socket, ready for MiniMax-H3's nine reference slots. If you've ever built a multi-character H3 chain, you know the alternative - nine LoadImage nodes, nine files to keep straight, and the second you rename a folder everything breaks. This collapses all of it into one widget.

    It's the batch counterpart to this pack's manual refs and the RefPicker-driven refs. Where the prompt-scanning AutoRefs picks photos by what the script names, this node is deterministic: you choose the folder, it chooses the files, and you know exactly what went in because the console prints each one and the node's picked output carries the list as a string.

    How it works

    Give it a folder and it loads images, applies EXIF orientation, converts to RGB, and slots them into nine ref_1ref_9 outputs. Empty slots emit None, which is what H3's reference inputs expect when they're unused. Two details make it feel like it was built by someone who actually runs chains:

    • pick chooses which files: first_n (sorted), by_seed (seeded selection, so you can iterate renders without shuffling the folder), or newest.
    • character (optional) filters to a subfolder under the root or a filename substring - so a folder of many people becomes "this node, that person" without a second widget.
    • max_refs (default 3, cap 9) limits how many slots get filled. The model's hard cap is nine, so the node won't exceed it.

    The node also tracks folder contents as part of its cache key, so adding or replacing a file re-triggers execution - no manual refresh.

    The inputs that matter

    • refs_root - the folder. Absolute path, or relative to ComfyUI's input directory.
    • pick / seed - how files are chosen; seed only matters for by_seed.
    • max_refs - how many slots to fill.

    Outputs are the nine ref_N images plus count (how many actually loaded) and picked (the filenames as a comma-joined string, handy for the report).

    Installing it

    Part of the ComfyUI-H3-Multishot pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/jlucasmcrell/ComfyUI-H3-Multishot
    

    Or search H3 Multishot in ComfyUI Manager. Requires ComfyUI v0.30.0+, and - since these are reference images for H3 - the ref2va checkpoint variant, which is the one that actually carries reference rows. The pack declares no Python dependencies.

    Gotchas

    The one thing that trips people: reference slots on the classic sampler bind every picture to the same subject unless you group them. If you're feeding photos of two different people, read this pack's reference_subjects documentation - pictures 1-3 declared as person A, 4-6 as person B - or H3 will blend two faces into one average person. And if you're on fl2va instead of ref2va, the references load fine but do nothing: fl2va has no reference rows and ignores them entirely.

    Categoryloaders/minimax

    Inputs (5)

    NameTypeDefaultDescription
    refs_rootSTRINGFolder of reference images. Absolute path, or relative to the ComfyUI input directory.
    pickCOMBOfirst_n3 options: first_n, by_seed, newest
    seedINT00–18446744073709550000Used by by_seed only.
    max_refsINT31–9How many references to emit (model cap is 9).
    characteroptSTRINGSubfolder name under refs_root, or a filename substring.

    Outputs (11)

    NameTypeDescription
    ref_1IMAGE
    ref_2IMAGE
    ref_3IMAGE
    ref_4IMAGE
    ref_5IMAGE
    ref_6IMAGE
    ref_7IMAGE
    ref_8IMAGE
    ref_9IMAGE
    countINT
    pickedSTRING