ComfyUI Extension: comfyui-transparent-png-creator
Run ComfyUI workflows without the setup
No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.
Create transparent PNG images from RGB + mask input with automatic bounding box cropping. Supports mask inversion and flexible image/mask size mismatch handling.
README
ComfyUI Transparent PNG Creator Custom Node
This custom node takes an RGB image and a mask, and returns an RGBA (transparent) image where the masked area remains opaque, and everything else is transparent. It can also automatically crop/trim the output image to the bounding box of the mask.
Node: Transparent PNG From Mask
Inputs:
image: The source image (RGB or RGBA).mask: The mask defining the area to keep (transparency stencil).trim_to_mask(Boolean, default:False): If enabled, crops the output image and mask to the bounding box of the masked region.padding(Integer, default:10): Bounding box padding in pixels.invert_mask(Boolean, default:False): Inverts the mask before processing.resize_mode(Option, default:scale_mask_to_image): Configures how to handle size mismatches between the image and the mask:scale_mask_to_image: Resizes the mask to match the dimensions of the input image.scale_image_to_mask: Resizes the input image to match the dimensions of the mask.none: Does not scale. Prints a warning and falls back to scaling the mask to prevent workflow crashes.
Outputs:
image: The resulting RGBA image tensor.mask: The cropped/adjusted mask tensor.
Run ComfyUI workflows without the setup
No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.