Load Image (Base64)
Feed an image into ComfyUI without touching the filesystem
- image
- mask
If you're driving ComfyUI from code instead of clicking around the graph, the normal Load Image node is a pain. It reads from disk, which means your external tool has to upload the file first, remember where it went, reference it by name, and hope nothing cleans it up mid-run. ETN_LoadImageBase64 deletes that whole dance. You embed the image directly in the prompt JSON as a base64 string, and the node decodes it in memory. No upload step, no temp files, no filename bookkeeping.
That's the entire reason this pack exists. Acly wrote the ComfyUI Nodes for External Tooling to make ComfyUI usable as a backend for other apps - most famously his own Krita AI Diffusion plugin, which paints straight onto a Krita canvas and is one of the most-used ways to run ComfyUI without ever seeing the node graph. As the README puts it, ComfyUI normally "exchanges images via the filesystem," which "invites a whole class of potential issues you might not want to deal with." This node is how the image gets in.
How it works
You pass the base64-encoded bytes of a PNG (the README's canonical format) as a plain string field on the node. When the prompt runs, the node base64-decodes that string, parses the PNG, and hands ComfyUI a normal IMAGE tensor - indistinguishable downstream from anything Load Image would produce. If the PNG carries an alpha channel, that alpha comes out as a MASK, which is exactly what you want for inpainting: send an RGBA image, get the picture and its transparency mask in one node.
The trade is that base64 inflates your payload by roughly a third and the whole image lives inside the prompt JSON. For one image per request that's nothing. If you're pushing many large images per prompt, the RAM-cache nodes in this same pack (Load Image from Cache) are the lower-overhead path - but they're more work to wire up, so start here.
The inputs and outputs that matter
image(STRING) - despite the name, this is text: the base64 of your PNG, single-line. Your external tool sets this field in the prompt it POSTs. In the editor it's just a string box, so this node is really meant to be filled programmatically, not typed by hand.
Two outputs, and both matter:
image(IMAGE) - the decoded RGB picture. Wire it into a VAE Encode, a preprocessor, an upscale, wherever your img2img or inpaint flow begins.mask(MASK) - the alpha channel, if the PNG had one. Straight into Set Latent Noise Mask or any inpaint node. If your source has no alpha, don't rely on this output carrying anything meaningful.
How to install it
One install covers the whole pack. Via ComfyUI Manager, search ComfyUI Nodes for External Tooling, install, restart. Or clone it:
cd ComfyUI/custom_nodes
git clone https://github.com/Acly/comfyui-tooling-nodes.git
and restart. This node has no model downloads or heavy dependencies - it's pure decode logic.
Common issues & troubleshooting
"Invalid base64" or a decode error. The usual culprit is a data-URI prefix. Send the raw base64 only - strip the data:image/png;base64, header your language's encoder or the browser might prepend. Also make sure you didn't wrap the string in newlines or quotes that leak into the field.
The mask output is empty or garbage. That output is the alpha channel. A flat JPEG or an RGB PNG has no alpha, so there's nothing to hand back. Encode your source as RGBA if you need the mask, or use the dedicated Load Mask (Base64) node in the pack when you're loading a mask on its own.
Colors look off. The node expects a real PNG (or another standard format the decoder recognizes). If you fed it raw pixel bytes rather than an encoded file, re-encode it as a PNG first - the node parses an image file, not a naked buffer.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |