Nodes/ComfyUI-Qwen2_5-VL/BatchImageLoaderToLocalFiles
ComfyUI Node

BatchImageLoaderToLocalFiles

The glue that lets a vision model look at several images at once

By MakkiShizu·Created about a year ago·Updated 11 months ago· 20
BatchImageLoaderToLocalFiles
    • BatchImage

    BatchImageLoaderToLocalFiles is the unglamorous utility that makes the "multi image" part of the ComfyUI-Qwen2_5-VL pack work. The vision model needs its inputs as files it can read, and the Run nodes' single image input only handles one image (or a batch it treats as one). This node sits in the middle: you wire several separate images into it, and it hands them onward as a BatchImage list that Qwen2_5_VL_Run and Qwen2_5_VL_Run_Advanced can then reason about together.

    Why does that matter? Asking "are these two images the same character?" or "compare the lighting in image one and image two" is a genuinely useful trick in a ComfyUI graph - consistency checking across a batch of generations, or feeding a reference image plus your render and asking the model to describe the differences. The pack's README shows exactly this: any number of images (or an animated/batch image) connected to the node, then into inference.

    How it works - and why the input list looks weird

    The trick is that this node has no static inputs in its definition. info_schema lists zero required inputs and zero optional ones; the image1, image2, ... sockets you actually see on the canvas are added at runtime by the pack's JavaScript (js/wid.js), which monitors connections and auto-creates a new input whenever you plug another image in. Each connected IMAGE tensor gets clipped to 0–255, converted to a PNG, saved into ComfyUI's temp folder with a random filename, and collected into the output list.

    There are two practical consequences. First, you can't resize or remove inputs by hand - the node adds them as you connect and removes them as you disconnect, which is fine once you know that's how it behaves. Second, the output type is BatchImage, not IMAGE, and only the two Run nodes in this pack accept it, so it doesn't branch to anything else. That's the whole node: images in, BatchImage out.

    Using it in a workflow

    There's nothing to configure - no dropdowns, no sliders. You load a couple of images with normal Load Image nodes, wire each into this node, and connect the BatchImage output to the BatchImage input on Qwen2_5_VL_Run or Qwen2_5_VL_Run_Advanced. Then write a text prompt that references them: "Compare these two images and tell me if they show the same person." The Run node appends each image in the batch to the chat as a separate image message, so the model sees them side by side.

    Installing

    Same pack, same steps as the rest: ComfyUI Manager search for "ComfyUI-Qwen2_5-VL", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MakkiShizu/ComfyUI-Qwen2_5-VL
    cd ComfyUI-Qwen2_5-VL
    pip install -r requirements.txt
    

    The requirements (qwen-vl-utils, transformers>=4.49.0) come along automatically. Two small notes: this is the node the README's "Multi image" section is talking about, and the dynamic input behavior depends on the JS loading, so if the pack installed cleanly but the node shows no input sockets at all, restart ComfyUI with a hard refresh (Ctrl+Shift+R) - the browser cache is the usual culprit. And keep in mind the images are written to the temp folder on every run, so a workflow with many inputs churns a bit of disk; that's normal, not a leak.

    CategoryQwen2_5-VL

    Inputs (0)

    No inputs

    Outputs (1)

    NameTypeDescription
    BatchImageBatchImage