Nodes/A8R8 ComfyUI Nodes/Base64Image Output Node
ComfyUI Node

Base64Image Output Node

Get pixels back as a string, not a file

By ramyma·Created 3 years ago·Updated 2 years ago· 74
Base64Image Output Node
  • images

    The mirror image of Base64ImageInput. Instead of ComfyUI saving your result to disk and making you go fetch it by filename or URL afterward, this node hands the finished pixels straight back as a base64 string, embedded in the same API response that triggered the run.

    Why this exists

    Same rationale as its input sibling: this pack is the ComfyUI-side plumbing for A8R8, a canvas-based frontend by the same author that drives A1111, Forge, or ComfyUI from the browser. A8R8's canvas needs the generated result back as raw pixel data it can paint directly onto its own layers - immediately, not by polling for a saved file and then fetching it separately. Base64ImageOutput is that shortcut: end your graph here instead of SaveImage, and the encoded image comes back in the execution response.

    The same trick is useful for anyone driving ComfyUI purely through the API, A8R8 or not - if you don't want a second round-trip to grab an output file, terminating the graph in this node gets you the pixels in one request/response cycle.

    The input, and why there's no output

    • images (IMAGE, required) - whatever you'd normally feed into SaveImage or PreviewImage.
    • No node outputs, by design - the schema marks it is_output_node: true with an empty outputs list, the same shape as SaveImage. It's a terminal node: ComfyUI executes it because it's the end of the graph, not because something downstream consumes a return value.

    Installing it

    Search "A8R8 ComfyUI Nodes" in ComfyUI Manager, or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ramyma/A8R8_ComfyUI_nodes
    

    Restart ComfyUI. No extra dependencies and nothing to download - encoding an image to base64 is stock Python, and this node never touches ComfyUI's output folder at all.

    Common issues

    No preview thumbnail in the UI. If you're used to SaveImage or PreviewImage popping a thumbnail in the node itself, you won't get that here - it's a headless, API-facing node with no image widget. While you're iterating visually in the editor, use PreviewImage; swap to this once you're actually wiring up the API call that needs the base64 payload back.

    Bigger payloads than you'd expect. Base64 inflates raw image bytes by roughly a third. For a single image in a tight request/response loop that's a non-issue; for batches or high-resolution output it adds up fast compared to just fetching a saved file by URL. This node is the right call for "one image, get it back now," not for bulk output.

    Nothing gets written to disk, ever. If you're expecting a copy to also land in ComfyUI's output/ folder the way SaveImage would, it won't - that's the entire point of the node, but it catches people who assume every terminal image node saves a file somewhere as a side effect. If you want both a saved file and the base64 response, you need a separate SaveImage node in the graph as well.

    CategoryA8R8

    Inputs (1)

    NameTypeDefaultDescription
    imagesIMAGE

    Outputs (0)

    No outputs