Nodes/ComfyUI-IntoTheLatent-Utils/ITL Multi Image Loader
ComfyUI Node

ITL Multi Image Loader

Load up to 8 images with one node, each on its own output socket

By Into-The-Latent·Created 29 days ago·Updated 15 days ago· 2
ITL Multi Image Loader
    • count
    • image_1
    • image_2
    • image_3
    • image_4
    • image_5
    • image_6
    • image_7
    • image_8
    files_json[]
    downscale_modeoff
    max_size1200
    output_slotsauto

    ComfyUI's stock Load Image handles exactly one image. When you want to feed three reference shots into three different branches in the same run - style reference here, subject there, control image over there - the stock answer is three Load Image nodes and three uploads. The ITL Multi Image Loader does it in one node: drop up to 8 files onto it and every file gets its own image_N output socket, so each one can travel somewhere different in the same graph.

    This is the "one node, many files, many destinations" pattern, and if you've ever fought with a batch loader that hands you one stacked tensor you have to slice up, you'll appreciate the difference. Here you just wire each image where it needs to go.

    How it works

    The node keeps a hidden files_json list - drop files onto the field (or click to browse; same field does both, no separate add button) and the front-end serializes them. Files are uploaded into ComfyUI's input/ folder, exactly like stock Load Image, so saved workflows survive restarts. Row order is socket order: the first row is image_1, and dragging the ⠿ grip to reorder moves what each socket carries.

    Two settings shape the behavior:

    • output_slots - auto (default) makes sockets appear and disappear as you add or remove files. Pin a fixed count (1–8) instead, and the sockets stay put while you swap files, so your wires don't break. Extra sockets with no file behind them output nothing - don't wire more sockets than you load, or you'll get None where you expected pixels.
    • downscale_mode / max_size - off (default) passes images through untouched. keep aspect ratio shrinks any image whose longest edge exceeds max_size (1200 by default), crop to square center-crops to a square, stretch to square forces one. The first two never upscale; masks follow their image; originals in input/ are never modified.

    The part that bites

    Each row has an on/off toggle, and the toggle is not the same as removing the file. A switched-off row keeps its socket position - nothing shifts - but that socket outputs None on the next run. The node tells you this is equivalent to leaving an unplugged OPTIONAL input, which is safe for optional inputs downstream. It is not safe if that socket feeds a REQUIRED input: that node will fail on None. Use the toggle for "keep this file listed but skip it this run," not as a delete.

    Also keep an eye on count (the INT output) - it counts only the enabled files actually emitted, not the row count. So if a row is toggled off, count drops even though the file is still listed.

    Outputs & install

    Outputs are count (INT) plus image_1 through image_8 (IMAGE). The Advanced sibling adds mask_N (inverted alpha, stock Load Image behavior) and filename_N per file.

    Install via ComfyUI Manager (search "ComfyUI-IntoTheLatent-Utils") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Into-The-Latent/ComfyUI-IntoTheLatent-Utils
    

    then restart. No extra dependencies.

    Reordering and removing files shifts what each socket carries, and the node flags in its status line whenever a change touches a socket that has a wire - check your connections when the warning appears. That status line is your friend; the pack ships with issues disabled, so the node's own warnings are the support you get.

    CategoryInto The Latent/image

    Inputs (4)

    NameTypeDefaultDescription
    files_jsonSTRING[]Authoritative file list as JSON. Hidden in the UI and kept in sync by the front-end — drop files onto the node instead of editing this.
    downscale_modeCOMBOoffoff = images pass through untouched. keep aspect ratio = shrink keeping shape so the longest edge is max_size. crop to square = centered square, at most max_size. stretch to square = force a max_size square (ignores shape). Never upscales (keep aspect ratio/crop to square); masks follow their image.
    max_sizeINT12008–8192Size threshold/target in pixels for downscaling. Ignored while downscale_mode is off.
    output_slotsCOMBOautoHow many output sockets to show. 'auto' follows the number of loaded files, so sockets appear and disappear as you edit the list. Pick a fixed number to keep the sockets (and your wires) in place while you swap files around — extra sockets with no file behind them output nothing, so don't wire more than you load.

    Outputs (9)

    NameTypeDescription
    countINT
    image_1IMAGE
    image_2IMAGE
    image_3IMAGE
    image_4IMAGE
    image_5IMAGE
    image_6IMAGE
    image_7IMAGE
    image_8IMAGE