Nodes/ComfyUI Load Image URL/Load Image (File/URL)
ComfyUI Node

Load Image (File/URL)

Load Image (File/URL) without the file-download dance

By Braeden90000·Created 9 months ago·Updated 9 months ago· 0
Load Image (File/URL)
    • IMAGE
    • MASK
    sourcefile
    image
    url

    Every ComfyUI workflow that starts from a reference image eventually hits the same annoyance: to use a picture you found online, you have to download it into ComfyUI/input, refresh the dropdown, and only then can the graph see it. Load Image (File/URL) collapses that into one step - paste a direct image URL into the node and it fetches the bytes for you, no browser tab, no save dialog, no restart.

    This is a thin, single-purpose node from a small pack, so set expectations: it does exactly one thing, it does it cleanly, and you'll only reach for it when you're repeatedly pulling images from the web (reference hunting, batch img2img from an API, feeding a remote render into an upscale pass). The name is not a lie - there's no cloud service and no API key, it's just requests running locally on your machine. That's also the security picture in one line: it will happily download from whatever host you point it at, so paste URLs you actually trust.

    How it works

    Under the hood it's two code paths in one node. In file mode it's essentially the stock LoadImage from core ComfyUI - it lists whatever's in your input folder and does the standard load-with-alpha-channel, EXIF-transpose, batch-frames handling. In url mode it fires a requests.get() with a browser user-agent and a 30-second timeout, slurps the bytes, and runs the same decode. Either way you get back the two outputs every image loader in ComfyUI hands you, which is what makes it a drop-in replacement: an IMAGE tensor to wire into a VAE encode (for img2img), a ControlNet preprocessor, an IP-Adapter, whatever - and a MASK output holding the alpha channel, inverted to match ComfyUI's mask convention (0 = keep, 1 = masked), or all-zeros - nothing masked - if the image has no alpha. Wire IMAGE where you'd normally wire a Load Image output and the rest of your graph doesn't know or care where the pixels came from.

    The JS file in the pack also gives you a live preview right in the node, so you can confirm the URL resolved before you queue anything. It's a small quality-of-life touch that makes the node feel more finished than its one-file core suggests.

    The inputs that matter

    Three fields, and you'll only really set one at a time:

    • source - dropdown switching between file and url. Defaults to file, so it won't surprise you if you open it cold.
    • image - the usual dropdown of files in your input folder (with upload support baked into the widget). Used when source is file.
    • url - the string field. Must be a direct image link (https://example.com/image.png), not a page URL, and it has to start with http:// or https:// or the node rejects it on validation.

    Installing it

    The usual two ways. ComfyUI Manager is easiest: search for "Load Image URL" and hit Install, then restart ComfyUI. Or clone it manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Braeden90000/comfyui-load-image-url.git load_image_url
    

    Then restart ComfyUI. The only Python dependency is requests, which you almost certainly already have - no models to download, no heavy wheels, nothing to trip over. This is as close to a zero-friction install as a custom node gets.

    Where people get burned

    The one real gotcha is hiding in the code, not the README. The node decides whether to re-run by hashing the URL string - not the bytes it fetched. So if you point it at a URL whose content changes over time (a dynamic endpoint, a refresh, a service that regenerates an image at the same address), ComfyUI will think "nothing changed" and skip the download, serving you the stale copy. Change the URL - add a query param - and it refetches. Annoying, but knowing it exists beats debugging it.

    Beyond that, standard web-fetch hazards apply: some hosts (Cloudflare-protected image boards, hotlink-protected CDNs) will 403 a scripted request no matter how polite the user-agent is, and a non-image URL that happens to return 200 will fail at decode. And remember the 30-second timeout - huge images on slow hosts may just give up. For reference images you use every day, a one-time download to input/ is still the more reliable habit; this node shines for the occasional, the remote, and the too-lazy-to-save cases.

    Categoryimage

    Inputs (3)

    NameTypeDefaultDescription
    sourceCOMBOfile2 options: file, url
    imageCOMBO1 options: example.png
    urlSTRING

    Outputs (2)

    NameTypeDescription
    IMAGEIMAGE
    MASKMASK