Nodes/Various ComfyUI Nodes by Type/Image Load RGBA From Clipboard
ComfyUI Node

Image Load RGBA From Clipboard

Paste an image and its alpha as a mask

By jamesWalker55·Created 3 years ago·Updated about a year ago· 215
Image Load RGBA From Clipboard
    • IMAGE
    • MASK

    JWImageLoadRGBA From Clipboard is the RGBA cousin of the plain clipboard loader: it pastes an image straight from your system clipboard, but instead of throwing the alpha away, it keeps it and hands the transparency back to you as a separate MASK. So you get two outputs in one shot - the color image and a ready-made mask.

    That combo is the point. When you copy a PNG with transparency - a cutout, a logo, a subject with the background already removed - the alpha channel is a mask of the subject. This node splits it out for you automatically: color goes down the IMAGE wire, transparency goes down the MASK wire, and you can feed that mask straight into compositing or inpainting without a separate alpha-to-mask step. For fast local work where you're pasting cutouts, it's a two-birds-one-node convenience.

    What it actually does

    On execution it reads the current clipboard, decodes the image while preserving its alpha channel, and produces two outputs: the RGB(A) image and a mask derived from the alpha. No inputs to set - like the RGB clipboard node, it just grabs whatever's on the clipboard at run time.

    The inputs and outputs that matter

    There are no inputs - it reads the clipboard directly.

    Two outputs:

    • IMAGE - the pasted image.
    • MASK - the alpha channel, as a mask. This is the extra you get over the RGB-only clipboard node: transparency handed to you as a usable mask.

    Wire the image into your pipeline and the mask into a compositing, inpaint, or latent-mask node.

    How to install it

    Pack: jamesWalker55/comfyui-various. ComfyUI Manager - search Various ComfyUI Nodes by Type, install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/jamesWalker55/comfyui-various
    

    then restart. It's part of comfyui_image_ops.py. Clipboard access depends on your OS having a real clipboard for ComfyUI to read.

    Common issues & troubleshooting

    Same hard limit as the RGB clipboard node: local only. It reads the clipboard of the machine running ComfyUI. On a hosted or serverless service like comfy.icu, that's a remote GPU worker with no access to your computer's clipboard - copying a cutout on your laptop does nothing there. This node is for a local install where ComfyUI and your clipboard share the same machine. On a hosted service, upload your PNG through the normal Load Image path instead (which also reads the alpha).

    Empty mask. If your pasted image had no alpha channel - a flat JPEG, say - there's no transparency to turn into a mask, so the MASK output will be empty or solid. To get a meaningful mask you need to copy an image that actually has transparency.

    Nothing / wrong content on the clipboard. If you copied text or the clipboard's empty, there's no image to load. And on a headless Linux box with no desktop session, there may be no clipboard to read at all.

    CategoryjamesWalker55

    Inputs (0)

    No inputs

    Outputs (2)

    NameTypeDescription
    IMAGEIMAGE
    MASKMASK