Load Image (Active Switch)
LoadImage with an off switch that actually skips the work
- IMAGE
- MASK
Load Image (Active Switch) is ComfyUI's stock LoadImage node with one addition that turns out to matter a lot: an active boolean. When it's on, it loads an image exactly like the built-in node. When it's off, it doesn't just return nothing - it returns a special "execution blocker" that tells ComfyUI to skip everything downstream of it for that run.
That's the difference that makes it worth having. With the plain LoadImage you can't "turn off" a branch without bypassing nodes by hand; this node gives you a data-driven switch, so a boolean from a JSON loader, a comparison, or a randomizer can enable or disable an entire inpaint/reference branch at runtime.
The inputs and outputs
image- a dropdown of image files in ComfyUI'sinput/folder, with upload support, same as stock LoadImage.active(BOOLEAN, default true) - the switch.- Outputs:
IMAGEandMASK, matching the built-in node. Alpha channels come out as a mask, and images without alpha get an empty 64×64 mask, exactly like core behavior.
How the switch works under the hood
Two details matter for real workflows. First, when active is false the node returns an execution blocker, which is not a value - it's a signal that skips the downstream branch entirely, so nothing downstream runs (and nothing errors out for lack of data). Second, the node declares an IS_CHANGED that hashes the actual file contents. That means two things: edits to the image file on disk are picked up on the next run (no stale cache), and when inactive the hash is a constant, so the disabled branch doesn't wake up the graph - the caching engine treats it as unchanged.
The upshot for you: a single boolean can toggle an entire image-driven section of the graph on and off, without touching node bypass toggles, and ComfyUI won't waste time re-reading the file every run.
Common issues
- My disabled branch still runs. Check that
activeis actually false and that the value is wired to the node you think it is. If some other node on the same branch is also an output node, the graph may still execute it. - The image dropdown looks empty. Drop images into
ComfyUI/input/(or upload through the node) and refresh - the list is built from files present when the node loads.
Install
Part of ComfyUI-JSON-Dynamic. ComfyUI Manager → search JSON Dynamic Loader, or:
cd ComfyUI/custom_nodes
git clone https://github.com/ethanfel/ComfyUI-JSON-Dynamic.git
# restart ComfyUI
No dependencies beyond ComfyUI core.
Verdict
If you only ever load a static reference image, use the built-in node. If you're building workflows where a branch sometimes needs to be skipped based on data - and especially if you're pairing it with the pack's Image Receiver or Preview-to-LoadImage - the active switch is a genuinely useful addition rather than a gimmick.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | 1 options: example.png | |
| active | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |