Nodes/ComfyUI-QwenVL-Utils/Load Image Advanced
ComfyUI Node

Load Image Advanced

A loader that hands your VLM the file path too

By AkihaTatsu·Created 7 months ago·Updated 6 months ago· 0
Load Image Advanced
    • image
    • mask
    • path
    image

    If you've used ComfyUI's built-in Load Image, you already know this node - it's the same trick with a longer receipt. "Load Image Advanced" (class QwenVLUtils_ImageLoader) loads an image and returns the image tensor, but it also hands you an alpha mask and, more interestingly, the actual file path. It ships in the QwenVL-Utils pack as the image front-end for the QwenVL nodes, but it works fine anywhere you want a loader that knows where its file lives.

    What comes out

    Three outputs:

    • image - the IMAGE tensor you'd wire into a VAE or a QwenVL node's image input.
    • mask - the alpha channel, inverted to match ComfyUI's mask convention (white = transparent). Images with no alpha get an empty 64×64 mask.
    • path - the absolute file path string. This is the reason to pick this loader over the built-in one.

    The path output is where the pack's design starts to show: the QwenVL nodes accept an optional source_path input, and the README frames these loaders as the way to get a file path into that input. Fair warning - in the current release the QwenVL backends consume the image/video tensors and the source_path input isn't wired into generation yet, so treat the path output as future-proofing plus a handy output for any other PATH-consuming node in your graph.

    What's actually different under the hood

    The source gives you three upgrades over stock Load Image. It iterates animated images via PIL's ImageSequence, so a GIF comes through as multiple frames instead of just the first one. It runs exif_transpose on load, so phone photos with EXIF orientation flags don't come in sideways. And it supports a wider format list: JPG, PNG, BMP, TIFF, WebP, and GIF. It also hashes the file for IS_CHANGED, meaning ComfyUI re-runs the node if the file on disk changes - handy for workflows that regenerate an input file and expect the graph to notice.

    Input and wiring

    One input: image, a dropdown of files in your ComfyUI/input folder with an upload button. Drag a file onto the node or click and drop it in - no different from the stock loader.

    Wire image into your QwenVL node (or wherever), and path into a Save-Text or PATH output to see what file actually got loaded. For captioning loops, path is also what you'd want to log alongside the model's RESPONSE so you know which image produced which text.

    Install

    It's part of the QwenVL-Utils pack, so install once and every node in it arrives together:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AkihaTatsu/ComfyUI-QwenVL-Utils.git
    cd ComfyUI-QwenVL-Utils
    pip install -r requirements.txt
    

    Or ComfyUI Manager → search "QwenVL Utils" → install → restart.

    Troubleshooting

    The loader lists files from the input directory, so the usual failure is "Invalid image file: example.png" - the file moved or isn't in ComfyUI/input. Drop it back in and refresh. Beyond that there's not much to trip over here: it's a loader, it either finds the file or tells you. The real gotchas in this pack live in the model nodes, not the input helpers.

    CategoryQwenVL-Utils/Input

    Inputs (1)

    NameTypeDefaultDescription
    imageCOMBO1 options: example.png

    Outputs (3)

    NameTypeDescription
    imageIMAGE
    maskMASK
    pathPATH