Load Image From URL
Pull any image from the web straight into your graph
- image
- mask
- url
Load Image From URL is exactly what it sounds like: give it a URL, get a ComfyUI IMAGE tensor (and a MASK) back - no downloading the file, dragging it into your input folder, and re-uploading. It's the "reference image from the web" node. You paste a link to a pose, a style sample, or a character sheet that's sitting on Civitai or some CDN, and the pixels land in the graph ready to feed a KSampler, an inpainting model, or an image-to-video conditioning block.
How it works
Nothing clever, which is the point. It fetches the URL with Python's urllib (with a proper User-Agent so servers don't shrug you off), opens the bytes with Pillow, and converts to tensors the same way ComfyUI's built-in LoadImage does. Two details matter:
- EXIF is handled. It runs
exif_transpose, so a phone photo's rotation tags don't leave you with a sideways image - the small stuff that breaks pipelines. - Alpha becomes a mask. For RGBA/PNG-with-transparency images, the
MASKoutput is1 - alpha- white where the image is transparent - which is exactly the convention ComfyUI uses everywhere else. No alpha? You get a zeroed mask. If you only need pixels, ignore the mask and wireimageonward.
The node is marked as an output node, so it shows a preview inline in the graph, and it re-fetches whenever the URL changes (its IS_CHANGED is just the URL string) - handy when you're iterating on a link.
Inputs and outputs
Only two inputs, and you'll touch one:
- url (required) - the image URL. Paste it in, or wire it from another node so it's driven dynamically.
- timeout (optional, default 60s) - how long to wait on the network before giving up. Worth raising for slow hosts or giant images.
Outputs: image (IMAGE), mask (MASK), and url (STRING - echoes back what you fed it, which is convenient if you're logging provenance).
Installing
Part of the ComfyUI-DioBrando-Nodes pack. ComfyUI Manager → search "ComfyUI-DioBrando-Nodes" → install, restart, done. Manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/DanielBartolic/ComfyUI-DioBrando-Nodes
cd ComfyUI-DioBrando-Nodes && pip install -r requirements.txt
That requirements.txt is Pillow, numpy, and torch - all already present in any ComfyUI install, so there are no heavy deps and no models to fetch. The node appears under DioBrando/IO.
Common issues
- URL fails / times out - dead link, hotlink protection, or the host is slow. Bump
timeoutand double-check the URL in a browser first. Some image hosts block non-browser requests, though this node's User-Agent header helps with that. - The mask is all black - that's correct if the source has no alpha channel. Only transparent images produce a mask; if you expected one, you're probably linking to a JPEG.
- It re-downloads a lot - that's by design (re-fetch on URL change), so in a long batch it's not cached across runs. Nothing to fix, just know it's doing network I/O each time the URL changes.
One caveat that's about the whole category rather than this node: a custom node is arbitrary Python running with your user's privileges, so it's worth a skim of what you install. This one is MIT-licensed and genuinely tiny - a fetch, a Pillow open, a tensor convert. It's the utility node you don't think about until the moment you need a web image in a graph and realize the built-in loader can't do it.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| url | STRING | https://example.com/image.png | — |
| timeoutopt | INT | 605–600 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| url | STRING | — |