ComfyUI Node

Load64image☀

Paste a base64 string, get an image tensor. That's the whole job

By Hasasasa·Created about a year ago·Updated 2 months ago· 7
Load64image☀
    • image
    base64_image

    Sometimes your image doesn't live on disk - it lives in a base64 string. Maybe it came out of an API response, maybe you copied it from a browser's dev tools, maybe your whole pipeline is string-based. ComfyUI has no native way to get from "a long base64 blob" to "an IMAGE tensor," and that's the gap Load64image fills. It's a tiny node with a single input and a single output, and there's genuinely nothing else to it.

    How it works

    You paste the base64 text into the base64_image field (multiline, so no paste-size limits) and it decodes, opens the bytes as an image with Pillow, converts to RGB, and returns a standard ComfyUI IMAGE tensor. Two niceties are worth knowing:

    • It strips a data:image/...;base64, prefix if present, so raw data URIs from APIs work as-is - no manual editing.
    • It's tolerant of whitespace and newlines in the blob, which you'll appreciate the first time you paste a wrapped base64 string that some tool line-wrapped.

    Inputs and outputs

    • base64_image - the string. That's the only input.
    • image - the decoded IMAGE tensor, ready to wire into anything.

    When you'd actually reach for it

    Honestly, this is a niche node, and that's fine. The use cases are real but specific:

    • You're working with an API that returns images as base64 (which is exactly the shape the API nodes in this pack deal in).
    • You're building a string-driven workflow where the image enters through a text field.
    • You want to test a decode path without touching the file system.

    Don't reach for it to load normal images - LoadImage and this pack's LoadImageList are better for files. This one exists for the string-shaped cases.

    Install

    It's part of DashuaiTools:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Hasasasa/ComfyUI_DashuaiTools
    

    then restart ComfyUI, or grab it through ComfyUI Manager ("DashuaiTools"). Dependencies: just Pillow, numpy, and torch, all already in ComfyUI. If the field is empty or the data is garbage, you get a clear base64_image is empty / invalid image data error rather than a silent failure - which is more than some nodes manage.

    CategoryImage/Load

    Inputs (1)

    NameTypeDefaultDescription
    base64_imageSTRING

    Outputs (1)

    NameTypeDescription
    imageIMAGE