ComfyUI > Nodes > ComfyUI-Hunyuan3d-2-1 > Hunyuan 3D 2.1 Load Image with Transparency

ComfyUI Node: Hunyuan 3D 2.1 Load Image with Transparency

Class Name

Hy3D21LoadImageWithTransparency

Category
Hunyuan3D21Wrapper
Author
visualbruno (Account age: 5579days)
Extension
ComfyUI-Hunyuan3d-2-1
Latest Updated
2025-08-11
Github Stars
0.23K

How to Install ComfyUI-Hunyuan3d-2-1

Install this extension via the ComfyUI Manager by searching for ComfyUI-Hunyuan3d-2-1
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Hunyuan3d-2-1 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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Hunyuan 3D 2.1 Load Image with Transparency Description

Facilitates loading images with transparency for AI artists, preserving alpha channels for seamless integration in creative projects.

Hunyuan 3D 2.1 Load Image with Transparency:

The Hy3D21LoadImageWithTransparency node is designed to facilitate the loading of images while preserving their transparency attributes. This node is particularly beneficial for AI artists who work with images that require transparency, such as PNG files with alpha channels. By maintaining the transparency, the node ensures that the images can be seamlessly integrated into various compositions without unwanted backgrounds. The node processes images by converting them into a format that retains the transparency information, making it easier to manipulate and use in 3D rendering or other creative projects. This capability is crucial for tasks that involve layering images or creating complex visual effects where transparency plays a key role.

Hunyuan 3D 2.1 Load Image with Transparency Input Parameters:

image

The image parameter accepts either a file path as a string or an image object. This parameter is crucial as it specifies the source image that you want to load with transparency. If a file path is provided, the node reads the image from the specified location, ensuring that the transparency data is preserved. If an image object is provided, it is converted to a format that supports transparency. This flexibility allows you to work with images stored locally or those already loaded into your project.

border_ratio

The border_ratio parameter is a float that determines the amount of border to be considered around the image during processing. The default value is 0.15, which means 15% of the image's border will be taken into account. This parameter is important for recentering the image and ensuring that the main content is properly aligned. Adjusting this value can impact how the image is resized and centered, which is particularly useful when dealing with images that have significant transparent areas around the edges.

to_tensor

The to_tensor parameter is a boolean that indicates whether the loaded image and its transparency mask should be converted into tensor format. By default, this is set to True, meaning the output will be in a format suitable for further processing in machine learning models or other computational tasks. If set to False, the image and mask will remain in their original array format. This option provides flexibility depending on the subsequent use of the image data.

Hunyuan 3D 2.1 Load Image with Transparency Output Parameters:

image

The image output is the processed image with transparency preserved, returned in the specified format (tensor or array). This output is essential for further manipulation or integration into projects that require transparency, ensuring that the visual integrity of the image is maintained.

mask

The mask output is a transparency mask that corresponds to the loaded image. This mask highlights the transparent areas of the image, allowing for precise control over how the image is used in compositions. The mask is particularly useful for tasks that involve blending or layering images, as it provides a clear delineation of the transparent regions.

Hunyuan 3D 2.1 Load Image with Transparency Usage Tips:

  • Ensure that the image file you are loading supports transparency, such as PNG files, to fully utilize the node's capabilities.
  • Adjust the border_ratio parameter to better center images with significant transparent borders, enhancing the alignment and presentation of the main content.

Hunyuan 3D 2.1 Load Image with Transparency Common Errors and Solutions:

FileNotFoundError

  • Explanation: This error occurs when the specified image file path does not exist or is incorrect.
  • Solution: Verify that the file path is correct and that the file exists at the specified location.

UnsupportedImageFormatError

  • Explanation: This error is raised when the provided image format does not support transparency.
  • Solution: Use an image format that supports transparency, such as PNG, to ensure the node can process it correctly.

ValueError: Invalid border_ratio

  • Explanation: This error occurs if the border_ratio is set to a value outside the acceptable range.
  • Solution: Ensure that the border_ratio is a float between 0 and 1, representing the percentage of the border to consider.

Hunyuan 3D 2.1 Load Image with Transparency Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Hunyuan3d-2-1
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.