Nodes/ComfyUI_Ib_CustomNodes/Load Image From Path
ComfyUI Node

Load Image From Path

Read images straight off disk, no duplicate upload

By Chaoses-Ib·Created 3 years ago·Updated 8 months ago· 56
Load Image From Path
    • IMAGE
    • MASK
    imageComfyUI_00001_-assets\ComfyUI_00001_.png [output]

    ComfyUI's built-in Load Image node has two annoyances that get old fast once you're iterating on real files: it "uploads" (copies) whatever you pick into ComfyUI's input/ folder, so you end up with duplicate copies scattered everywhere, and it caches that copy - edit the source file and hit queue again, and you can still get served the old version until you manually re-upload. LoadImageFromPath sidesteps both. Give it a path instead of a file, and it reads straight off disk every time the graph runs. No duplicate, no stale copy.

    The author built this specifically to fix that caching complaint when it came up in the ComfyUI community, and the classic use case is a Photoshop round trip: export a layer with Quick Export, point this node at the exported file, run your img2img or inpaint pass, edit in Photoshop again, rerun - no re-upload dance in between. If you're doing that seriously today, the pack's own README now points to a more specialized tool, comfyui-photoshop, which adds actual file-watching so ComfyUI kicks off on save. LoadImageFromPath is the more general, more manual version of the same idea: it won't watch anything for you, but any time you queue the graph, you get the file as it currently exists.

    The mechanism is just string parsing. The single input is a path, and ComfyUI needs to know how to resolve it. Four formats work: a full absolute path (D:\ComfyUI\output\...), or a path relative to one of ComfyUI's three special folders, tagged with a bracket suffix - foo.png [input], foo.png [output], or foo.png [temp]. Drop the bracket on a relative path and it has no folder to check, so that's the first thing to fix if you get a "file not found." On a cloud executor like the one running your job on comfy.icu, keep in mind the path is relative to that machine's filesystem, not your laptop - genuinely useful for pointing at a file another step in the same run already produced, much less useful as a way to browse your own desktop.

    The inputs and outputs that matter

    • image (STRING) - the path, in one of the four formats above. That's the whole required input; the default value shown on the node (ComfyUI_00001_-assets\ComfyUI_00001_.png [output]) is just a placeholder example, not a real file.
    • Outputs: IMAGE and MASK - the same pair the stock Load Image node produces. MASK comes from the file's alpha channel if it has one; if it doesn't, you get a default full mask, same as ComfyUI's own loader.

    How to install it

    Through ComfyUI Manager: search "ComfyUI_Ib_CustomNodes" and install. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Chaoses-Ib/ComfyUI_Ib_CustomNodes
    

    then restart ComfyUI. There's nothing else to configure - no extra Python packages, no model downloads. It's a handful of pure-Python nodes built on Pillow, which ComfyUI already ships with.

    Common issues & troubleshooting

    "Missing node type" on someone else's workflow. If you loaded a graph that used this node and don't have the pack, ComfyUI Manager's "Install Missing Custom Nodes" will find and install it - that's the whole reason Manager exists, and it's worth having regardless of this specific pack.

    Bracket-less relative paths don't resolve. Covered above, but it's the single most common trip-up: foo.png alone means nothing to this node; it needs the [input] / [output] / [temp] tag, or a full absolute path.

    A Windows path pasted into a Linux job. Backslashes and drive letters (D:\...) are a Windows thing. If your executor runs Linux - most cloud ComfyUI does - a copy-pasted Windows path won't resolve. Use forward slashes and a path that actually exists on the machine running the graph.

    It's not a file watcher. Editing the source image doesn't trigger a rerun by itself - you still have to hit queue. What you get is the current file's contents when you queue, not a live-reload loop. For that specific Photoshop live-reload behavior, that's what comfyui-photoshop is for.

    Categoryimage

    Inputs (1)

    NameTypeDefaultDescription
    imageSTRINGComfyUI_00001_-assets\ComfyUI_00001_.png [output]

    Outputs (2)

    NameTypeDescription
    IMAGEIMAGE
    MASKMASK