Load Image Path ๐๐ ฉ๐
Load an image from a path or URL string, not an upload button
- default_image
- image
- mask
- filename
The stock Load Image node in ComfyUI is built around a file-upload widget - you click, you browse, you pick a file. That's fine for one-off manual work, but it falls apart the moment you want the image source to be dynamic: a path coming from another node, a URL, a file some external script just wrote to disk. Load Image Path replaces the upload button with a plain string input, so anything that can produce a string can decide what image loads.
How it works
Give it a path or URL as text and it reads the image from there at graph-run time. The README is specific about what "path" covers: relative paths, absolute paths, ~ and ~user home-directory shortcuts, and plain http/https URLs - so the same node handles "load this local file" and "fetch this image off the web" without you needing a separate node for each.
The inputs and outputs that matter
image_path(required, STRING, default./input/example.png) - the path or URL to load. This is the one input you're actually setting, and it's a text field rather than a picker, which is exactly what makes it wireable from upstream nodes.RGBA(required, bool, default off) - whether to export the image with an alpha channel.default_image(optional, IMAGE) - a fallback used if the given path or URL is invalid or fails to load. Worth setting ifimage_pathis coming from somewhere that might occasionally hand you garbage.
Outputs: image (wire into your usual img2img/conditioning chain), mask (an alpha-derived mask, standard ComfyUI image-loader behavior), and filename - a string output most stock loaders don't give you, handy if you want to log or reuse the source filename downstream (e.g. naming your output after the input).
How to install it
Via ComfyUI Manager: search "ComfyUI_zfkun", install, restart. Manually:
cd ComfyUI/custom_nodes/
git clone https://github.com/zfkun/ComfyUI_zfkun
pip install -r requirements.txt
then restart. Nothing to download for this node specifically - it reads files, it doesn't ship any.
Common issues & troubleshooting
Relative paths aren't resolving where you expect. The default value, ./input/example.png, tells you the intent: relative paths are relative to ComfyUI's own working directory (typically its input/ folder), not to the custom node's folder or wherever your workflow JSON lives. If a relative path isn't found, try the absolute path first to confirm the file's actually there, then work backward.
A URL load hangs or times out your run. Fetching over HTTP happens synchronously as part of node execution - an unreachable or slow URL will stall that step. If you're loading remote images regularly, expect run time to include network latency, and don't rely on it for anything time-sensitive.
The node fell back to default_image and you didn't notice. Since a bad path silently substitutes the fallback (when one's wired in) rather than hard-erroring, it's easy to think a run succeeded on the real image when it actually used the fallback. If you're debugging why output looks wrong, check filename in the output - it'll tell you what actually got loaded.
Pairing this with the pack's capture servers. The README pitches this node alongside the Camera Capture Simple / Window Capture Simple servers for "real-time virtual live" setups: the server writes a frame to disk on a loop, and Load Image Path (pointed at that fixed filename) picks it up each run. If you're chasing that workflow, it's worth reading the server section of the README - it's a separate Python script you run alongside ComfyUI, not a ComfyUI node itself.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image_path | STRING | ./input/example.png | Network address or local path (supports relative paths) of the image to be loaded (default is "./input/example.png") |
| RGBA | COMBO | false | Whether to export the image in RGBA format |
| default_imageopt | IMAGE | Fallback image used when the specified loading address is invalid or reading fails |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | โ |
| mask | MASK | โ |
| filename | STRING | โ |