Load Image @Liam
Pull an image from a URL instead of only the input folder
- IMAGE
- MASK
Core ComfyUI's LoadImage only reads from your local input folder - you drag a file in, or drop it on the node. This node is the same thing with one extra trick: give it a URL and it'll fetch the image over HTTP before loading it. The pack's README is explicit about why it exists - "when using API interfaces, images are stored in OSS" - meaning the author built this to load images from cloud object storage when driving ComfyUI through its API. If you're feeding a workflow remotely, or you just want to drop in an image from a CDN without downloading it by hand, this is the node.
It's not otherwise fancy. Both the local and remote paths end up in the same place: an IMAGE tensor plus a MASK (from the alpha channel, inverted, if the source has one) - exactly what you'd wire into VAE Encode, img2img, or a ControlNet preprocessor.
The inputs that matter
url- if it starts withhttp, the node callsrequests.get()on it and loads whatever image comes back. Leave it blank and it falls back to the dropdown.image- a dropdown of files in yourinputfolder, with upload support. This is the "local" path.
There's an important quirk: the URL check is just url.startswith('http'), so a non-URL string in the url field does not fall through to the local dropdown - it tries to open a file literally named that string. Keep url empty unless you're actually fetching.
How it works
Under the hood it converts everything to a float RGB tensor in [0,1] with a leading batch dimension, and honors EXIF orientation. If the source image has an alpha channel, the MASK output is 1 - alpha (so opaque pixels are 0 in the mask, matching ComfyUI's inverted-mask convention).
Installing it
Ships in the LiamUtil pack. ComfyUI Manager → search LiamUtil → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/ai-liam/comfyui-liam
pip install -r requirements.txt
The pip dependency is opencv-python (the rest of the pack needs it); loading images itself needs nothing beyond requests, which ComfyUI already ships.
Where people get burned
The biggest gotcha is that the requests.get() has no timeout and no error handling. Point it at a slow or dead server and the node hangs until something upstream gives up; a 404 or a non-image body throws a raw exception with a console traceback rather than a friendly message. For local use, most of the value is honestly in the URL fetch - the local half is a re-implementation of core LoadImage without its polished UI. One more thing: the dropdown is built from whatever's in input/ when ComfyUI starts, so files added mid-session may not show up until you restart the server.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| url | STRING | — | |
| image | COMBO | 1 options: example.png |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |