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

Load Image From Path

Skip the input folder, point straight at a file

By 807502278·Created 2 years ago·Updated 11 months ago· 20
Load Image From Path
    • image1
    • mask1
    PathFileName

    The regular Load Image node only ever shows you a dropdown of whatever's sitting in ComfyUI's input folder. That's fine for manual work, but the moment you're scripting a workflow, looping over a directory with an external tool, or building something API-driven, a dropdown is the wrong interface. Load Image From Path is the answer: give it a string, get back an image. No menu, no folder restriction.

    It's part of ComfyUI-WJNodes, a personal utility pack by a GitHub user known only by the handle 807502278 - the README's own description is "a simple node package that I use myself," which is an accurate summary of most of the nodes in it, this one included.

    What it's for

    Where Load_Image_Adv (the pack's other loader) still works off ComfyUI's managed input dropdown, this node takes a raw file path as text and loads whatever's there. That matters for a few concrete cases: driving ComfyUI from an external script that writes a path into a text field before queueing the prompt, chaining it after this pack's own Split_Path node when you're doing path manipulation upstream, or pointing at a location entirely outside the normal input folder - anywhere on the machine's filesystem the process can read.

    That last point is worth sitting with for a second. Custom nodes in ComfyUI run as ordinary Python with the same filesystem access as the process itself - there's no sandbox stopping a node from reading (or writing) anywhere it's told to. That's true of the whole ecosystem, not something specific to this pack, but a node whose entire job is "load whatever path you give it" is the most literal expression of it. If you're running ComfyUI somewhere multi-tenant, be deliberate about what paths you feed this thing.

    Inputs and outputs

    Just one input:

    • PathFileName - a plain string, the full path to the image file.

    And two outputs: image1 and mask1, which behave like any other image/mask pair and wire into the usual places - a sampler's reference input, a preview node, a compositing node.

    That's the entire interface. No format dropdown, no invert toggle - if you need the format flexibility or mask inversion that Load_Image_Adv offers, that's the node to reach for instead. This one is deliberately minimal.

    Installing it

    Through ComfyUI Manager: search "ComfyUI-WJNodes" and install. Manually:

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

    Restart ComfyUI afterward. No models, no heavy dependencies - this node is a thin wrapper around Python's standard image-reading, so if it's installed at all, it works.

    Troubleshooting

    This is a low-visibility pack with essentially no community discussion around it - no threads, no tutorials, nothing beyond the README, so there's no crowd-sourced answer to fall back on if something's odd. In practice the failure modes are exactly what you'd expect from "load a file at this path":

    The path has to be one the ComfyUI process itself can see and read. If you're running ComfyUI inside a container or on a remote machine, a path that's valid on your local desktop won't resolve - a classic "works on my machine" trap when you paste a path from your file browser into a workflow meant to run somewhere else.

    If the node fails silently or the menu entry doesn't appear at all, check the ComfyUI startup console for an import error before assuming the file itself is the problem - that's the standard first diagnostic for any custom node, and it applies here just as much as anywhere else.

    Beyond that, there isn't much to break: no models to download, no format quirks, no version-specific gotchas reported anywhere. It's about as simple as a loader node gets.

    CategoryWJNode/ImageFile

    Inputs (1)

    NameTypeDefaultDescription
    PathFileNameSTRING

    Outputs (2)

    NameTypeDescription
    image1IMAGE
    mask1MASK