ImageSaveAsBase64(ImageIOHelpers)
Export an image as base64 text — the save node that never writes a file
- images
Core ComfyUI's Save Image is a file writer. This node is the same idea with the file swapped for a string: ImageSaveAsBase64(ImageIOHelpers) takes an image and hands you its base64 encoding instead of a PNG on disk. It's the flip side of the pack's ImageLoadFromBase64 - encode here, decode there, image travels as plain text in between.
It's an output node, which is the first thing to get straight: it has no graph outputs. The schema is images in, and that's the end of the line. So where does the base64 go? To ComfyUI's console/log - the terminal where you launched the server - not onto a wire you can attach downstream. That makes it clunky in interactive sessions (you'll be scrolling a wall of text), but in headless and API runs it's genuinely useful: your outer script triggers the workflow and reads the encoded image straight out of the logs, no file management needed. If that sounds niche, it is - but it's a niche that recurs.
The inputs
images- the IMAGE tensor you want encoded.save_prompt(boolean, default true) - embed the workflow JSON into the encoded PNG's metadata, mirroring core Save Image's behavior. This is why you can drag a saved PNG back into ComfyUI and get the whole graph.save_extra_pnginfo(boolean, default true) - embed any extra metadata attached to the run.
Those two toggles are copied straight from core Save Image, and they matter more here than usual: if you're shipping a base64 image out of ComfyUI, embedding the workflow means the receiving end (or future-you) can reconstruct exactly how it was made.
How to install it
cd ComfyUI/custom_nodes
git clone https://github.com/Ryuukeisyou/comfyui_image_io_helpers
Restart, or install via ComfyUI Manager (search "comfyui_image_io_helpers"). No models, no heavy deps. The pack is small and its GitHub repo has been 404ing lately - if a clone fails, that's the known issue, not your command.
Where people get burned
The size reality check hits first: base64 inflates data by ~33%, so a full-res PNG becomes a multi-megabyte text blob in your console. If the run "works" but you're staring at a terminal full of garbage-looking text, congratulations, that's the feature - you're supposed to capture it programmatically, not read it.
And since there's no file written and no output socket, there's also no visible artifact in the UI. If you expected a PNG in your output folder, this node will look like it did nothing. It didn't - check the console. If you actually wanted a file at a path you control, use the pack's ImageSaveToPath instead; that one writes real files and even lets you pick the folder. This one is for the text round-trip, and only when that's genuinely what you need.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| save_prompt | BOOLEAN | true | — |
| save_extra_pnginfo | BOOLEAN | true | — |
Outputs (0)
No outputs