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

Hunyuan 3D 2.1 Load Image with Transparency

Load an image in ComfyUI without throwing away its alpha channel

By visualbruno·Created about a year ago·Updated 5 days ago· 375
Hunyuan 3D 2.1 Load Image with Transparency
    • image
    • mask
    • image_with_alpha
    image

    Stock ComfyUI's Load Image flattens your PNG to RGB and the alpha channel quietly ceases to exist. Fine for image work. Annoying for 3D, where a transparent-background render is the whole point - you want the object, not the background it was saved on. Hy3D21LoadImageWithTransparency is the version that keeps the alpha: same input-picker UI as Load Image, three outputs instead of two.

    What you get out

    • image - the standard RGB tensor. This is what you feed into a Hunyuan 3D 2.1 generator node, same as you'd feed any ComfyUI image.
    • mask - the alpha channel, converted to a ComfyUI MASK (inverted so white = opaque object, matching ComfyUI convention). Handy if you want the silhouette for anything downstream - background-aware workflows, compositing, that sort of thing.
    • image_with_alpha - the original image tensor before the RGB flatten, alpha intact. The "with transparency" output the node is named for.

    It also behaves like the node it replaces: animated formats (GIF/WebP) are iterated into a batch, EXIF orientation is corrected, and the node tracks file changes by content hash so ComfyUI doesn't cache-stall on a re-saved image.

    Why this node exists

    Honestly? Mostly for the pack's own workflows. When you're generating a 3D mesh from a transparent product shot, losing the alpha in the first step means you're either re-cropping by hand or relying on the pipeline's background remover later. This node hands the generator a clean RGB frame and keeps the transparency around as a mask so the whole graph can make use of it. If you're not doing 3D, the standard Load Image does everything this does except the two extra outputs - so don't reach for it unless the alpha matters.

    Using it

    It's part of the ComfyUI-Hunyuan3d-2-1 pack, so you get it as a bonus when you install that (clone + requirements, plus the two Hunyuan checkpoints - the full drill is on the mesh generator page). There are no settings beyond picking the file; the dropdown lists images in ComfyUI's input folder, and you can upload straight from the widget.

    The main thing to know is which output to wire where: image goes to the 3D generator or anything that wants plain RGB, mask goes to anything that wants a silhouette, and image_with_alpha is there when a downstream node genuinely needs the RGBA. Get the wiring wrong and you'll feed the generator a flattened image and never notice the transparency existed.

    CategoryHunyuan3D21Wrapper

    Inputs (1)

    NameTypeDefaultDescription
    imageCOMBO1 options: example.png

    Outputs (3)

    NameTypeDescription
    imageIMAGE
    maskMASK
    image_with_alphaIMAGE