Nodes/ComfyUI-PM-Manager/PM Image Loader
ComfyUI Node

PM Image Loader

ComfyUI's Load Image, but you can see what you're picking

By pixel-magician·Created 7 months ago·Updated 4 months ago· 0
PM Image Loader
    • image
    • mask
    image

    The core "Load Image" node is fine. It's also a blind dropdown of filenames, and when your input folder has a hundred files with names like img_0231.png, picking the right one is a guessing game. PM Image Loader is the PM Manager pack's answer: same job - pull an image out of ComfyUI's input folder and hand it to the graph as an IMAGE tensor - but with a picker that actually previews the file before you commit. If you live in img2img, inpainting, or ControlNet workflows, that preview saves you real time.

    It's also just a good citizen under the hood. It hashes the file so that if you replace an image on disk, ComfyUI re-reads it instead of serving you a stale cached copy - a quiet fix for a classic "why is it still showing the old image" annoyance.

    How it works

    Read the source and you'll find it's core LoadImage, reimplemented with a bit more care. It handles multi-frame formats (GIFs, MPO) by loading every frame as a separate image in the batch, it respects EXIF orientation so your phone photos aren't sideways, and it does the standard alpha handling: if the image has an alpha channel, you get a mask output that's black where the image is transparent. No alpha? You get an empty 64×64 mask instead, which is what the rest of the ecosystem expects so downstream nodes don't choke.

    Inputs and outputs

    • image - a dropdown of image files in your ComfyUI/input folder. This is the only input, and the pack's UI also gives you an upload button so you can drop a file in without leaving the graph.
    • image - the IMAGE output. Wire it into VAE Encode for img2img, a ControlNet preprocessor, an upscaler, or anything else that eats pixels.
    • mask - the MASK output, from the image's alpha channel. Wire it into mask-aware nodes for inpainting.

    Yes, the input and first output are both called image - the input is the file you're choosing, the output is the tensor. One's a string, one's an image; ComfyUI keeps them straight, and so will you.

    Installing it

    It ships with the whole PM Manager pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/pixel-magician/ComfyUI-PM-Manager.git
    # restart ComfyUI
    

    Or install via ComfyUI Manager by searching for ComfyUI-PM-Manager. No models to download, no special setup - the requirements (opencv-python, imageio-ffmpeg) are handled by the install.

    Common issues

    The dropdown only lists files in ComfyUI/input - if you can't see your file, it's not there, and the upload button is the fix. A "Invalid image file" error on load means the file vanished or got renamed between selection and execution; re-pick it. And the usual PM pack caveat applies: it's built on ComfyUI's newer extension API, so if the node doesn't appear at all, update ComfyUI rather than blaming the install.

    CategoryPM Manager

    Inputs (1)

    NameTypeDefaultDescription
    imageCOMBO1 options: example.png

    Outputs (2)

    NameTypeDescription
    imageIMAGE
    maskMASK