Light-Tool: Load Image From URL
Load images straight from a URL — several at once, if you like
- image
Every so often you want to run a workflow on an image that lives on the other side of the internet - a reference from a URL, a screenshot someone posted, a batch of frames from an API. Downloading it by hand, dropping it in the input folder, and refreshing the picker is exactly the kind of manual chore a node should eat. Light-Tool: LoadImageFromURL is that node: paste a URL, get an IMAGE out.
Inputs: url (multiline string) and keep_alpha_channel (default off). Output: a single image. The URL field is multiline because it's happy to take several URLs - comma-separated - and returns them all as one batched image tensor. It even tolerates a full-width Chinese comma (,) in the list, which is a nice touch for a pack written by a Chinese-language author who knows exactly which keyboards produce which commas.
How it works. It fetches each URL with httpx, opens the bytes as an image, applies EXIF orientation, and converts - honoring keep_alpha_channel for RGBA sources, same as the pack's local LoadImage. Successful images get concatenated into a batch; a URL that fails with a non-200 status just prints a warning to the console and is skipped.
The failure mode you'll actually hit. Because failed URLs are skipped rather than raised, the node only crashes when every URL fails - at which point torch.cat gets an empty list and you get an inscrutable error. So the practical debugging rule is: if the node errors, check the console output for "Failed to retrieve image, status code:" lines, because a single bad URL in a multi-URL list won't stop the run, just quietly drop that image. And there's no timeout configured, so a stalled host can hang the queue until httpx gives up.
The alpha reminder. Same story as everywhere in this pack: with keep_alpha_channel off, an RGBA PNG from the web is flattened to RGB and its transparency is destroyed. If the URL points at a cutout you intend to composite, tick the box.
When you'd reach for it. Workflows fed by APIs, reference images fetched on the fly, or batch setups where the input set changes without you touching the input folder. It's a niche, but when it's your niche it saves you a tedious download-and-reload cycle every single run.
Installing. Standard for the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/ihmily/ComfyUI-Light-Tool.git
pip install -r requirements.txt
# restart ComfyUI
Or ComfyUI Manager → search ComfyUI-Light-Tool → Install. No models. It pulls in httpx for the requests, one of the pack's listed dependencies.
Caveat before you build a whole workflow on it: the node downloads the images fresh every run - there's no disk cache, so it's only as fast and reliable as the remote host. For stable, repeatable reference images, the local LoadImage is the calmer choice. This one is for when the source genuinely needs to be a URL.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| url | STRING | https://www.comfy.org/images/ComfyUI_00000.png | — |
| keep_alpha_channel | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |