Nodes/ComfyUI-MaxedOut/Load Image (From Folder) MXD
ComfyUI Node

Load Image (From Folder) MXD

Load an image, get its prompts back too — and batch the whole folder

By Maxed-Out-99·Created about a year ago·Updated 29 days ago· 9
Load Image (From Folder) MXD
    • IMAGE
    • MASK
    • positive
    • negative
    • filename
    sourceoutputs
    image
    run_folderfalse

    Load Image (From Folder) MXD is the loader you want when "load an image" isn't enough - you also want its alpha channel as a mask, the prompt it was generated with, and the filename, and you want the option to just process the entire folder. It reads from both inputs and outputs, which already beats the core loader for workflow work, and the run_folder toggle turns a single-file load into a folder-wide auto-queue.

    How it works

    Pick source (outputs or inputs) and an image from the union of both, and the node loads it the way you'd hope: EXIF orientation is applied, the image becomes a float IMAGE tensor, and the alpha channel - if the file has one - is converted to a MASK. The genuinely useful bit is prompt extraction: if the PNG carries embedded generation metadata, the node parses it and hands you the positive and negative strings as outputs. That means an image generated last week can drop straight into a new workflow with its original prompt intact, no retyping. A filename output carries the base name for downstream nodes.

    Inputs that matter

    • source - outputs or inputs. Defaults to outputs; switch to inputs for source material you've dropped into the input folder.
    • image - the file dropdown.
    • run_folder - the star. Flip it on and hitting Queue Prompt auto-queues every image in that file's folder, one after another, instead of just the selected one. That's the batch button for "process everything in here."

    Outputs: IMAGE, MASK, positive, negative, filename.

    Wiring it in

    The filename output is the key to the round-trip trick: connect it to Save Image (Dataset) MXD's filename input, and every image saves back under its own name - no counters, no prefixes - so the sidecar caption files still match. For LoRA dataset prep you'll often want that positive output feeding a text encoder or caption handling while the image goes through preprocessing. And run_folder + the filename output is a genuinely pleasant way to run a whole dataset folder through the same graph.

    Installing

    ComfyUI Manager → search "Maxed Out" → install, restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Maxed-Out-99/ComfyUI-MaxedOut.git
    

    No pip dependencies.

    Common issues

    The mask is alpha-only: an image without transparency gets a zeroed mask, which trips people up when they expect a subject mask. Prompt extraction is best-effort - if the PNG has no metadata or the JSON doesn't parse, positive/negative come back empty rather than erroring, so don't panic at empty strings. And run_folder walks the selected file's folder including subfolders, so point it at a folder you actually want drained.

    CategoryMXD/Image

    Inputs (3)

    NameTypeDefaultDescription
    sourceCOMBOoutputs2 options: outputs, inputs
    imageCOMBO1 options: example.png
    run_folderBOOLEANfalseWhen enabled, hitting Queue Prompt auto-queues every image in this file's folder, one after another, instead of just the selected file.

    Outputs (5)

    NameTypeDescription
    IMAGEIMAGE
    MASKMASK
    positiveSTRING
    negativeSTRING
    filenameSTRING