YK-LoadImageFromURL
Pull a reference image straight from a URL
- image
The whole job, in one sentence
ComfyUI's built-in LoadImage only reads from your ComfyUI/input/ folder - upload an image in the UI and it copies the file there (see the three-directory convention in the KB). That's fine until your source image is somewhere else: a direct link on a CDN, a raw GitHub URL, a frame served by another machine. Then the chore becomes download → drag into input/ → refresh → finally queue. YK_LoadImageFromURL cuts that out. You paste a URL into one box, hit queue, and the node hands the fetched image to your graph as a normal IMAGE tensor - the same thing LoadImage would have produced.
It's a small node with a small appetite, so there's no PR story here. It just quietly fixes an annoying gap.
How it works
Read the source and it's exactly what you'd hope: requests.get(url, timeout=30), check the response status, open the bytes with Pillow, force RGB, and convert to a torch tensor scaled to 0–1 with a batch dimension added - [1, H, W, 3]. The output plugs into anything that expects an image: VAE Encode for an img2img pass (denoising strength does the rest - see the img2img breakdown in the KB), a ControlNet preprocessor, or an IP-Adapter reference.
Two honest caveats about what it doesn't do. It sends no headers - no User-Agent, no referer, no auth token. It doesn't resize, cache, or retry. It fetches the URL fresh on every execution, and what comes back is stored as-is in memory.
The inputs and outputs that matter
There's exactly one, which is the nice part:
- url (string, required) - the image URL. That's it.
Output: image (IMAGE) - wire it into any image-consuming input downstream. And because the node is single-shot, a batch of URLs means one node per URL, or loop them with whatever batching tool you already use.
Install
The standard two ways, same as any custom node:
- ComfyUI Manager → Install Custom Nodes → search YK-ComfyUI-LoadImageFromURL, then restart.
- Or by hand:
then restart ComfyUI.cd ComfyUI/custom_nodes git clone https://github.com/ds-fae/YK-ComfyUI-LoadImageFromURL
No model downloads, no heavy dependencies. The pack's own pyproject.toml lists requests, Pillow, numpy, torch - all of which a stock ComfyUI already ships. This is the rare install that's genuinely done in a minute.
Where people get burned
Most failures are the source URL, not the node - and its errors are the good kind: it wraps the failure in a RuntimeError that includes the URL, so you can see exactly which fetch died.
- 403/hotlink block. Because the node sends no
User-Agentor referer, hosts that guard against hotlinking (Imgur, some CDNs) will reject the barepython-requestsrequest. Swap to a direct/raw URL, or host the image somewhere that allows plain fetches. - Dead or signed URLs. Expired presigned links and short-lived CDN tokens will 404 - the status check throws before any image handling.
- Alpha gets dropped. The
convert("RGB")step throws away the alpha channel, so a transparent PNG loads with its transparency discarded. Load flat RGB and it's fine; rely on transparency and it isn't. - No downscaling. A 4000×4000 photo becomes a 4000×4000 float tensor, fully in RAM. This node isn't your resizing step.
- The 30-second timeout bites on slow hosts. And since every run re-hits the URL, a flaky host will fail mid-batch.
One security note, briefly: it's a fetch-any-URL node with no credentials, which makes it far lower-risk than the API-wrapper nodes the KB warns about - but don't paste URLs you don't trust into a workflow you share, because the fetch runs on whoever queues it.
Verdict
If you never need a remote image, stock LoadImage plus the input folder is fine and you owe this pack nothing. But the moment your img2img reference lives on a URL - and especially if you're scripting or batch-running from a list of links - this tiny node is the one I'd reach for. It's the whole workflow's least interesting node, and that's exactly the compliment.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| url | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |