⛧Load Single Image
Absolute paths, a real status flag, and no crashes
- image
- is_loaded
Two things make ComfyUI's built-in LoadImage annoying when you're automating: it only reads from the input/ folder, and if a file is missing it fails hard. Load Single Image is the from-disk, never-crashes alternative. You give it a directory path and a filename, it loads the image, and - the part that earns it a place in this pack - it also tells you whether it actually succeeded, so your workflow can react instead of dying.
The brief describes it exactly: "Returns is_loaded=true if successful, false if file not found or error." That boolean output is the whole design thesis. This is a loader built for loop and batch pipelines where a missing file is a condition to handle, not a reason to stop the queue.
Inputs and outputs
- path - the directory. Any absolute path on the machine; the placeholder even shows a Windows example. Quotes are stripped if you paste a copied path.
- filename - the file's name, e.g.
frame_0012.png.
Outputs:
- image - the loaded image as a standard
IMAGEtensor (RGB, 0–1, batched). - is_loaded -
trueon success,falseon any failure.
Here's the thing to know before you use it: when loading fails, image is not empty - it's a blank 64×64 black frame. The node returns a harmless stand-in so nothing downstream explodes, and signals the real state through is_loaded. If you wire the image straight into a sampler without checking the flag, a missing file will quietly render a black frame into your output. The intended pattern is to gate on is_loaded: branch on it, or feed it into a Raise Exception Message node to stop the run deliberately.
Mechanism, from the source
The loader cleans both inputs (strips quotes and whitespace), joins them with os.path.join, normalizes the path, and checks it exists and is a file before opening. It converts to RGB and to a float tensor in one pass, then returns (image, True). Every failure path - empty input, missing file, path-is-a-directory, unreadable image - returns (blank, False) and prints a [LoadSingleImage] error to the console. Nothing raises.
Install
Part of ComfyUI-HeresyNodes, heresyCoder's small personal pack for Wan video file management:
cd ComfyUI/custom_nodes
git clone https://github.com/heresyCoder/ComfyUI-HeresyNodes
Restart ComfyUI, or install via Manager by searching "ComfyUI-HeresyNodes". No models to download, no pip packages beyond what ComfyUI already ships.
The honest take
The blank-frame fallback is a trap if you ignore is_loaded, and a feature if you don't - knowing the difference is the whole article. ComfyUI's default loader is fine when you're clicking around and the file is in input/. This node is for the automated case: paths assembled at runtime, files that might be missing, and a workflow that should decide what to do about it rather than dying in a red error box. If you're building a loop that reloads a reference frame from a previous iteration, is_loaded is the signal that tells the loop whether the previous iteration actually produced a file. That's a niche, but it's a real one.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| path | STRING | — | |
| filename | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| is_loaded | BOOLEAN | — |