Nodes/ComfyUI-LoadByUrl/🖼️ Load Image by URL
ComfyUI Node

🖼️ Load Image by URL

Paste an image URL, skip the file browser

By romandev-codex·Created 8 months ago·Updated 7 months ago· 0
🖼️ Load Image by URL
    • IMAGE
    • WIDTH
    • HEIGHT
    urlhttps://example.com/image.png
    max_width0
    max_height0
    divisible_by16

    LoadImageByUrl is the node for the most annoying 20 seconds in ComfyUI: you found a reference image online, and you have to save it to disk, hunt it down in the Load Image picker, and hope it isn't sitting in Downloads under a filename like image (7).png. This node skips all of that - paste a URL into the box, hit run, and it lands in your graph as a normal IMAGE tensor, no file browser involved.

    It comes from a small pack called ComfyUI-LoadByUrl by romandev-codex. The whole pack is basically four URL loader nodes - image, multiple images, video, audio - with no API keys, no accounts, no cloud service in the middle. The name isn't a marketing stretch: it just fetches bytes over HTTP and hands them to ComfyUI.

    How it works

    Under the hood it's a plain requests.get(url) - the source is one file, remote_media_nodes.py, and there's not much magic. The downloaded image gets EXIF-rotated (so phone photos come out the right way up), forced to RGB, and converted to the standard ComfyUI IMAGE tensor: (1, H, W, 3) floats from 0 to 1. That's exactly what Load Image produces, so the output plugs into anything that takes an IMAGE socket - img2img, IPAdapter, ControlNet preprocessors, a VAE encode, whatever you'd feed a locally-loaded image.

    Three sizing inputs matter, and the defaults are worth understanding before they surprise you:

    • max_width / max_height - caps, in pixels. 0 (the default) means "leave it alone." Set one and the image is scaled down proportionally (LANCZOS, so it stays sharp) to fit; the 0 default is the sane choice unless you're feeding something with a hard resolution budget.
    • divisible_by - default 16. After any resizing, the image is center-cropped to a multiple of this. This exists because diffusion models hate non-multiple-of-16 dimensions, and the node is doing the crop so your samplers don't have to. The catch: it crops, not pads, so a 1000×900 image at default settings comes back 992×896. If you were expecting the exact URL dimensions, this is why you're not getting them.

    The node also outputs WIDTH and HEIGHT as ints - handy if you want to carry the actual resolution through the graph instead of hardcoding it.

    One nice touch: it implements IS_CHANGED keyed on the URL, so ComfyUI's cache treats it like a file loader. Same URL in twice, and it won't re-download - it re-fetches only when you change the URL, not on every queue run.

    Installing it

    ComfyUI Manager is the easy path: open Manager → Install Custom Nodes → search "LoadByUrl" and install ComfyUI-LoadByUrl, then restart. Or, by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/romandev-codex/ComfyUI-LoadByUrl
    

    Then restart ComfyUI. The image node itself needs nothing extra - requests, Pillow and numpy already ship with ComfyUI. But see below, because the pack's other nodes do need one manual dependency, and it's a package-level gotcha you'll want before installing this.

    Where people get burned

    The pack has no requirements.txt - the README is literally just the repo name. That's fine for the image node, but the video and audio nodes in the same pack import av (PyAV), which does not ship with ComfyUI. If you install the pack and none of the nodes appear at all, that's why: the whole file fails to import. Fix it with pip install av into the same Python environment as ComfyUI, then restart.

    For this node specifically, keep two things in mind. Hotlink-protected URLs (image CDNs that check the Referer header) will come back 403 and raise an error - the node has no headers or auth, so use a direct or signed URL. And there's no request timeout in the code, so a URL that hangs can stall your whole queue; prefer a reachable host.

    All four loader nodes sit in the "Remhes/Remote" category in the node menu. If your URL is just one image, this is the one you want.

    CategoryRemhes/Remote

    Inputs (4)

    NameTypeDefaultDescription
    urlSTRINGhttps://example.com/image.png
    max_widthINT00–10000
    max_heightINT00–10000
    divisible_byINT161–10000

    Outputs (3)

    NameTypeDescription
    IMAGEIMAGE
    WIDTHINT
    HEIGHTINT