Load Img From URL (EZ)
Load an image from a URL — and get a mask out of it too
- image
- mask
Load Img From URL (EZ) pulls an image straight off the internet and into your graph as a tensor, no downloading to ComfyUI/input required. And unlike most URL loaders, it hands you a mask alongside the image - derived from the image's alpha channel - so it slots into inpainting workflows without extra nodes.
Why you'd reach for it
ComfyUI's stock Load Image only sees local files. When your input lives at a URL - a remote gallery, a Discord CDN, a generated asset from another service - this node skips the download-then-reload dance. It also handles two inputs the plain web loader won't touch: data: URIs (base64 images inlined in text) and s3:// URIs (via AWS credentials). If you're building automation where images arrive over HTTP, this is the node that ingests them.
How it works
The loader branches on the URL's prefix:
http(s)://- fetches withrequests.get, using a 5-second timeout, and errors with the server's message if the status isn't 200.data:image/...- decodes the base64 payload directly. This is what makes it a natural partner for the pack's Assoc Img node: a dict value that's a data URI can be decoded right back into an image.s3://- reads the object via boto3 using the default credential provider (your AWS env vars,~/.aws/credentials, or an attached IAM role).
Then it transposes EXIF orientation, converts to RGBA, and returns the image plus a mask. Here's the detail that matters: the mask is 1 − alpha, so transparent pixels become white (masked) and opaque pixels become black. An ordinary photo with no alpha channel gets a zero mask.
The inputs and outputs
- url (STRING) - HTTP, data URI, or S3 URI.
- image (IMAGE, output) - the loaded image as an RGB tensor.
- mask (MASK, output) - inverted alpha; white where the source was transparent. For no-alpha images it's all-black (nothing masked).
Installing it
Part of easy-comfy-nodes. ComfyUI Manager: search easy-comfy-nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/wmatson/easy-comfy-nodes
# restart ComfyUI
Where people get burned
- The 5-second timeout is firm. Slow CDNs and big files will fail cleanly but often. This is not the node for a 50 MB asset from a laggy server.
- No auth headers. Public URLs and S3-with-credentials are covered; anything behind a login is not - there's no way to attach a bearer token to the HTTP path.
- S3 needs credentials configured. The node uses the default credential chain, so if your ComfyUI box has no AWS access configured,
s3://URIs just error. - The mask is a byproduct, not a cutout. It reflects the source file's alpha, not a segmentation. A JPEG has no alpha, so the mask will be empty; don't expect background removal.
It's a quiet workhorse: load a remote image, wire the mask into an inpaint setup, move on. If you work with remote image sources at all, you'll miss it the moment it's not there.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| url | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |