Nodes/ComfyUI-ARZUMATA/Load Image From Path
ComfyUI Node

Load Image From Path

Load an image from an absolute path — and crack open Krita files while you're at it

By ARZUMATA·Created 2 years ago·Updated 3 months ago· 5
Load Image From Path
    • IMAGE
    • MASK
    • STRING
    • PATH
    image

    ComfyUI's built-in LoadImage is great until it isn't. It only lets you pick from the input folder via a file browser, it returns no usable path, and it stares blankly at anything that isn't a plain image file. This node - Load Image From Path - is the fix for all three. You give it a path, it gives you the image, the mask, and the path itself as a data output.

    The path-as-data part is the reason this node exists. The author says they built it specifically to feed workflows like ComfyUI_Qwen2-VL-Instruct, where a vision-language model wants to know the file path of the image it's reasoning about, not just the pixels. If you've ever tried to make a VLM tell you which image in a folder it's describing, you'll know why a loader that returns PATH instead of a silently-dropped string is worth having.

    The inputs and outputs that matter

    There's exactly one input: image, a plain STRING - the file path. No file browser. Paste it, or drag the file onto the field, and the node strips any quotes that Windows drag-and-drop sneaks in.

    Four outputs:

    • IMAGE - the pixels, ready for anything.
    • MASK - an alpha mask. If the image has an alpha channel it becomes a mask (white = transparent, the standard ComfyUI convention); if there's no alpha you get a fixed empty 64×64 mask, same as stock LoadImage.
    • STRING and PATH - both carry the file path as text, so you can pass it to a node that wants the raw string or one that's typed for PATH.

    The Krita party trick

    The headline feature is .kra support. A Krita file is secretly a zip archive, and this node opens it, finds mergedimage.png, and loads that - so you can feed an active painting file straight into img2img without exporting first. For anything else it falls through to standard loading. The mechanism is borrowed and adapted from JDC_ImageLoader in Jordach's comfy-plasma, and it's the kind of small quality-of-life thing that makes you wonder why ComfyUI doesn't do it natively.

    Installing it

    It ships in the ComfyUI-ARZUMATA grab-bag, so:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ARZUMATA/ComfyUI-ARZUMATA
    

    Restart ComfyUI, or install via ComfyUI Manager by searching ComfyUI-ARZUMATA. Zero extra dependencies, zero model downloads - it's PIL, numpy, and torch, all of which ComfyUI already has.

    Where people get burned

    • No file picker. If you're used to the stock LoadImage's nice browser, this feels backwards. The trade is that the path becomes data you can script and share.
    • Krita files without mergedimage.png error out. Save-with-history or some layer setups won't include it; check the file.
    • Typed paths are fragile. A missing file is caught at queue time with a "No file found" validation error - decent, but you'll still be hunting down the typo. On Windows, forward slashes work, so prefer those.
    • The alpha mask is inverted from what a paint program shows you: the transparent area comes out as the mask's white region. That's deliberate (it matches ComfyUI's masking convention), but it surprises everyone once.

    It's a small node in a small pack, and if you never load .kra files or hand paths to a VLM, you don't need it. If you do either, it's the one you'll reach for instead of the stock loader every single time.

    Categoryimage

    Inputs (1)

    NameTypeDefaultDescription
    imageSTRING

    Outputs (4)

    NameTypeDescription
    IMAGEIMAGE
    MASKMASK
    STRINGSTRING
    PATHPATH