Nodes/Comfyui_PDuse/PD Load Image
ComfyUI Node

PD Load Image

Load Image, but it also tells you the filename and format

By 7BEII·Created 2 years ago·Updated 15 days ago· 53
PD Load Image
    • image
    • mask
    • image_name
    • image_format
    image

    ComfyUI's stock Load Image is one of the most-used nodes in the program, and it's hard to improve on. PD_load_image_v1 ("PD Load Image") mostly doesn't try - it's a near-clone of the core loader with the same upload dropdown, the same EXIF-orientation handling, the same alpha-to-mask behavior. The one real difference, and the reason it exists: it also hands you the filename and format of the loaded image as strings. That's a small thing that unlocks genuinely useful workflows - naming saved output after the input, matching a batch, or logging what you processed.

    It's from the 7BEII/Comfyui_PDuse pack, which ships a whole family of loaders; this is the simplest of them.

    How it works

    It reads its image dropdown from your input/ folder (with an upload button, same as core), then loads with the standard Pillow path: EXIF transpose applied so phone photos aren't sideways, multi-frame support for GIFs/animations, and I mode images handled. The output IMAGE is the pixels; the MASK is the alpha channel when the image has one (all-white mask when it doesn't - standard behavior). Then the two additions:

    • image_name - the filename without the extension (portrait, not portrait.png).
    • image_format - the extension with the dot (.png, .jpg).

    That pair is what the core node keeps to itself. Use image_name as the prefix in a save node and you get output files named after their inputs automatically - "process portrait.png, save portrait_edited.png" with zero hand-typing. For a batch loop over several images, that's the difference between sane output folders and 0001_0002_0003 soup.

    The inputs and outputs

    • image - dropdown of input/ images plus upload button.
    • Outputs: image (IMAGE), mask (MASK), image_name (STRING), image_format (STRING).

    Everything wires like the core loader, so it drops into existing graphs without rethinking anything - just swap the node.

    Installing

    ComfyUI Manager, search Comfyui_PDuse; or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/7BEII/Comfyui_PDuse
    cd Comfyui_PDuse
    pip install -r requirements.txt
    

    Restart. No models.

    Gotchas

    Honest take: if you never need the filename as data, the stock Load Image is identical and you shouldn't bother. The useful-but-rare edge: image_name is the base of the filename in your input folder, not a sanitized or date-stamped variant, so if two folders share names you can get collisions downstream. And the pack's usual quirks apply - Chinese README, inconsistent display naming. Where this node genuinely earns its slot is any workflow where the input's identity has to travel through the graph as a string: batch captions, filename-driven routing, or output naming. If that's your use case, it's the loader to reach for; if it's not, it's a perfectly fine drop-in that you'll use the core half of.

    CategoryPD:load image

    Inputs (1)

    NameTypeDefaultDescription
    imageCOMBO1 options: example.png

    Outputs (4)

    NameTypeDescription
    imageIMAGE
    maskMASK
    image_nameSTRING
    image_formatSTRING