Nodes/Mango Node Pack/Image Loader (Mango)
ComfyUI Node

Image Loader (Mango)

Batch img2img without dragging in fifty files

By mang01010·Created 2 years ago·Updated 5 months ago· 3
Image Loader (Mango)
    • IMAGE
    subfolder

    The usual way to do img2img on a folder of images is: open them one by one, reload the graph each time, curse, repeat. Image Loader (Mango) takes a different approach - it loads every image in a subfolder as a single batch, so one queue run processes them all. It's the batch img2img tool the pack README calls out as its headline new feature.

    The catch, and it's a genuine one: it reads from your output folder, not from a dedicated input folder. The intended flow is to make a subfolder under ComfyUI/output/, drop your source images in there, then pick that subfolder from the node's dropdown. It's a slightly backwards mental model - you're treating your output directory as scratch space - but once you've done it once, it's a fast way to run a whole set.

    How it works

    The node walks your output directory, builds a dropdown of every subfolder, and when you pick one it loads all supported image files (.png, .jpg, .jpeg, .bmp, .tiff, .webp) in sorted order. Each file is decoded, EXIF-transposed, converted to RGB, normalized to 0–1 float tensors, and stacked into one batched IMAGE tensor that flows into your img2img pipeline. It only takes the first frame of animated files, and if a folder is empty it returns a dummy tensor rather than crashing.

    Inputs and outputs

    • subfolder - the one input: a dropdown of subfolders under the ComfyUI output directory. Select the folder you filled with images.
    • IMAGE - the output: a batched tensor, ready to wire into a VAE Encode (for img2img) or wherever else your workflow wants an image batch.

    Installing it

    Image Loader (Mango) comes with the Mango Node Pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/mang01010/MangoNodePack
    

    Restart ComfyUI, or install "Mango Node Pack" from ComfyUI Manager. The README's only extra dependency is pip install safetensors.

    Gotchas

    Three things to know before you rely on this node. First, the subfolder dropdown is built from the output directory at graph-load time - if you add images after loading the workflow, you may need to reload the node/graph for the list to refresh, and images already in a chosen folder won't appear until you reselect it. Second, all images get loaded at their native resolution, which means a folder of mixed sizes produces a batch that's only as uniform as your folder - mismatched sizes will break or distort downstream ops, so pre-normalize or sort by size first. Third, the "empty folder → dummy tensor" behavior means an empty selection gives you a 1×1 black placeholder instead of a clear error, which can look like a mystery bug if you're not expecting it. If you're doing serious folder-scale img2img, this is a genuinely handy shortcut; just respect its output-folder quirk.

    CategoryMango Node Pack/Loaders

    Inputs (1)

    NameTypeDefaultDescription
    subfolderCOMBOSelect a subfolder from the ComfyUI output folder.

    Outputs (1)

    NameTypeDescription
    IMAGEIMAGE