Load Image from Cache
Pull a pre-uploaded image from RAM by id
- image
- mask
The lower-overhead cousin of Load Image (Base64). Instead of embedding the whole picture inside every prompt you send, your external tool uploads the image once to ComfyUI's RAM cache, gets an id, and then this node just references that id. The bytes never hit disk and never bloat your prompt JSON. For a tool that reuses the same input across several runs - or pushes big images - this is the efficient path.
It's part of Acly's ComfyUI Nodes for External Tooling, the pack that lets ComfyUI act as a backend for outside apps (his Krita AI Diffusion plugin being the headline example). Base64 loading is the simple way in; this cache is the fast way in. As the README frames it, uploading to the cache "has less overhead compared to embedding images as base64 into the prompt, but is more complex to implement" - because you have to do the upload step yourself.
How it works
Before you run the workflow, your client sends the raw PNG (or JPEG - "other formats also work") as an HTTP PUT to /api/etn/image/{id}, where you pick any id that won't collide with your other uploads. ComfyUI stashes the decoded image in RAM. The request returns 201 if it was freshly stored and 200 if that id was already cached - handy for skipping re-uploads. Then, inside the graph, this node takes that same id and pulls the image back out.
Because the image is held in memory rather than serialized into the prompt, you can reference one upload from many prompts without resending it, and your prompt payloads stay tiny. The cost is the extra PUT call and the id bookkeeping, which is why base64 is the friendlier starting point and this is the optimization you reach for once the simple path is a bottleneck.
The inputs and outputs that matter
id(STRING) - the id you used in the upload PUT. This is the only input, and it's the entire contract: match it exactly to what you uploaded.
Two outputs:
image(IMAGE) - the RGB picture. Feeds img2img, inpaint, preprocessors, whatever.mask(MASK) - the alpha channel of an RGBA upload, or the first channel if there's no alpha present. Wire it into your inpaint mask input when you uploaded an RGBA source.
How to install it
The pack installs as one unit. ComfyUI Manager: search ComfyUI Nodes for External Tooling, install, restart. Manual clone:
cd ComfyUI/custom_nodes
git clone https://github.com/Acly/comfyui-tooling-nodes.git
then restart. Nothing to download beyond the node code.
Common issues & troubleshooting
"Image not found" for the id. Either you never PUT it, the id doesn't match character-for-character, or the cache entry expired. Uploaded images live in RAM, so a ComfyUI restart or enough time will drop them - re-upload and retry. The 201/200 return codes on your PUT tell you whether the store actually holds it.
The mask is odd. With no alpha in the upload, this output falls back to the image's first channel, which usually isn't a meaningful mask. Upload RGBA if you specifically need the alpha as a mask.
Just getting started? If the id-and-PUT choreography is more than your tool needs, use Load Image (Base64) instead - one node, image goes in the prompt, done. Come back to the cache when payload size or repeated inputs make the base64 route hurt.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| id | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |