Nodes/ComfyUI-Seed-Nodes/Seed-Nodes: LoadImage
ComfyUI Node

Seed-Nodes: LoadImage

The LoadImage that actually keeps your alpha channel

By Aerse·Created 2 years ago·Updated about a year ago· 5
Seed-Nodes: LoadImage
    • image
    • mask
    image
    keep_alpha_channeltrue

    ComfyUI's built-in LoadImage quietly flattens your PNGs to RGB. Most of the time that's fine. But the moment you're working with cutouts, sprites, stickers, or anything where transparency is the whole point, the built-in node is quietly destroying your data and you might not notice for a while. Seed-Nodes: LoadImage is the same node with a keep_alpha_channel toggle bolted on, so you can finally load an RGBA image and keep the alpha.

    How it works

    You pick a file from ComfyUI's input folder like any loader. The image dropdown is populated from files in your input directory, and you can upload through it too. Then the keep_alpha_channel boolean (default on) decides the fate of your pixels:

    • On - images with an alpha channel load as 4-channel RGBA.
    • Off - they get flattened to RGB, like the stock node.

    Either way you get a mask output that's built from the alpha channel as 1 - alpha, so opaque areas are black in the mask - the standard ComfyUI convention. Images without alpha just get a blank mask. The node also runs an EXIF auto-rotate, and it handles multi-frame files like GIFs by loading every frame into the batch, same as ComfyUI's own loader.

    Why you'd bother

    This node exists because transparency workflows are a chain, and the load step was the weak link. Once you've pulled a clean cutout out of a background-removal model - BiRefNet or rembg or whatever you're using - you want to carry that alpha all the way into compositing without it being stripped at the front door. Feed this into the pixelators or the transparency crop in the same pack, or straight into an ImageCompositeMasked, and the alpha survives.

    Honestly, if you only ever load opaque photos, the stock node is fine and you don't need this. It's a niche node for a niche problem - the kind of thing you install the pack for and forget about until the day it saves you twenty minutes of debugging why your "transparent" image has a black background.

    How to install it

    Part of the ComfyUI-Seed-Nodes pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Aerse/ComfyUI-Seed-Nodes
    # restart ComfyUI
    

    Or use ComfyUI Manager and search "ComfyUI-Seed-Nodes". No model files, no extra pip packages beyond what ComfyUI already ships. One note: the README's clone command points at a dead URL (github.com/Seed/...) - the real repo is Aerse/ComfyUI-Seed-Nodes.

    Common issues

    • Image still loads flattened - double-check the toggle is actually on, and that the file genuinely has an alpha channel (a PNG can be RGB with no alpha at all, in which case there's nothing to keep).
    • Node not showing up - after installing the pack, restart ComfyUI; it'll appear under the "Seed-Nodes:" group.
    • Preview looks weird - some preview nodes render RGBA images with the alpha baked onto black. That's the preview lying to you, not the node. Check it in a node that respects alpha before you panic.

    If you composite or sprite-work at all, keep this one in the back pocket. It's tiny, it's free, and it fixes a real gap.

    CategoryComfyUI-Seed-Nodes

    Inputs (2)

    NameTypeDefaultDescription
    imageCOMBO1 options: example.png
    keep_alpha_channelBOOLEANtrue

    Outputs (2)

    NameTypeDescription
    imageIMAGE
    maskMASK