ComfyUI  >  Nodes  >  ComfyUI Nodes for External Tooling >  Load Image (Base64)

ComfyUI Node: Load Image (Base64)

Class Name

ETN_LoadImageBase64

Category
external_tooling
Author
Acly (Account age: 3813 days)
Extension
ComfyUI Nodes for External Tooling
Latest Updated
6/24/2024
Github Stars
0.2K

How to Install ComfyUI Nodes for External Tooling

Install this extension via the ComfyUI Manager by searching for  ComfyUI Nodes for External Tooling
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI Nodes for External Tooling in the search bar
After installation, click the  Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Load Image (Base64) Description

Decode and process Base64-encoded images for AI workflows, generating masks from alpha channels for manipulation tasks.

Load Image (Base64):

The ETN_LoadImageBase64 node is designed to decode and process images encoded in Base64 format, making it an essential tool for AI artists who work with image data in this format. This node takes a Base64-encoded string representing an image, decodes it, and converts it into a format suitable for further processing in AI workflows. It also generates a mask from the image's alpha channel if present, which can be useful for various image manipulation tasks. By using this node, you can seamlessly integrate Base64-encoded images into your projects, enabling more flexible and dynamic image handling.

Load Image (Base64) Input Parameters:

image

This parameter expects a Base64-encoded string representing the image you want to load. The string should be a valid Base64 representation of an image file, such as a PNG or JPEG. The node will decode this string and convert the image into a format that can be used in subsequent processing steps. The input should be a single-line string without any line breaks or additional characters.

Load Image (Base64) Output Parameters:

IMAGE

The IMAGE output is a tensor representation of the decoded image. This tensor is in RGB format and normalized to have values between 0 and 1. It is suitable for use in various image processing and AI tasks, allowing you to manipulate and analyze the image data effectively.

MASK

The MASK output is a tensor representing the alpha channel of the image, if present. This mask is normalized to have values between 0 and 1, where 1 indicates full transparency and 0 indicates full opacity. If the image does not have an alpha channel, the node generates a default mask filled with zeros. This mask can be used for tasks such as image compositing, masking, and other operations that require transparency information.

Load Image (Base64) Usage Tips:

  • Ensure that the Base64-encoded string is correctly formatted and does not contain any extraneous characters or line breaks to avoid decoding errors.
  • Use the MASK output to handle transparency in images effectively, especially when compositing or blending images.
  • Combine this node with other image processing nodes to create complex workflows that involve loading, manipulating, and saving images.

Load Image (Base64) Common Errors and Solutions:

Invalid Base64-encoded string

  • Explanation: The provided string is not a valid Base64-encoded image.
  • Solution: Verify that the input string is correctly encoded in Base64 format and does not contain any extraneous characters or line breaks.

Unsupported image format

  • Explanation: The decoded image is in a format that is not supported by the node.
  • Solution: Ensure that the image is in a commonly supported format such as PNG or JPEG before encoding it in Base64.

Missing alpha channel

  • Explanation: The image does not have an alpha channel, resulting in a default mask.
  • Solution: If an alpha channel is required, ensure that the original image includes transparency information before encoding it in Base64.

Load Image (Base64) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI Nodes for External Tooling
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.