Visit ComfyUI Online for ready-to-use ComfyUI environment
Convert image tensors to Base64-encoded strings for easy handling and transfer in various applications.
The Base64ImageOutput
node is designed to convert image tensors into Base64-encoded strings, making it easier to handle and transfer image data in a compact and efficient format. This node is particularly useful for AI artists who need to embed images directly into web pages or transfer them over networks without dealing with file systems. By converting images to Base64, you can seamlessly integrate visual content into various applications, ensuring compatibility and ease of use. The node processes each image tensor, converts it to a PNG format, and then encodes it into a Base64 string, which can be easily decoded back into an image when needed.
The images
parameter expects a list of image tensors. Each tensor represents an image that will be processed and converted into a Base64-encoded string. This parameter is crucial as it provides the raw image data that the node will transform. The images should be in the form of PyTorch tensors, typically with values normalized between 0 and 1. There are no specific minimum or maximum values for this parameter, but the quality and size of the input images will directly affect the output.
This node does not have explicit return types defined in the RETURN_TYPES
attribute. However, the output is structured as a dictionary containing Base64-encoded image strings.
The ui
output is a dictionary with a key images
, which holds a list of Base64-encoded strings. Each string corresponds to an image tensor provided in the input. This output is essential for embedding images in web applications or transferring them as text data. The Base64 strings can be easily decoded back into images using standard Base64 decoding methods.
.cpu()
method.None
.None
before processing.© Copyright 2024 RunComfy. All Rights Reserved.