Nodes/ComfyUI-JNK-Tiny-Nodes/Create RGBA Image JNK
ComfyUI Node

Create RGBA Image JNK

A transparent canvas when your workflow needs one

By Aljnk·Created about a year ago·Updated 12 months ago· 3
Create RGBA Image JNK
    • image
    custom_width512
    custom_height512
    fill_type
    color#ffffff

    Every now and then a workflow needs a blank image to start from - not a latent, an actual image with an alpha channel. That's what Create RGBA Image is for. It generates a solid RGBA image of whatever size you ask for: fully transparent, or filled with any hex color. It's the "empty canvas" node, and it earns its keep whenever you're compositing.

    The classic use: you've cut out a subject with ToonOut Remove BG or one of the alpha-layer nodes, and you want to lay it onto a transparent background of a specific size before adding other layers on top with Add Layer Overlay. Core ComfyUI has no one-click "give me a transparent PNG-sized blank" node - this fills that gap in one shot.

    Inputs and outputs

    • custom_width / custom_height - pixel dimensions, 4 to 99999 (default 512×512).
    • fill_type - empty (fully transparent) or color (solid fill).
    • color - hex like #ffffff when you picked color; ignored for empty.

    Output: image - a 4-channel RGBA IMAGE tensor at your requested size.

    How it works

    Under the hood it's a single PIL call: Image.new('RGBA', (w, h), color_tuple). For empty the fill is (0,0,0,0) - pure transparency. For color it parses your hex into RGB and sets alpha to 255 - fully opaque. So "color" always means opaque color; if you wanted a translucent colored canvas, you'd make it with empty and fade it through Add Layer Overlay's opacity slider instead.

    Installing it

    Pack install: search JNK in ComfyUI Manager, or

    cd ComfyUI/custom_nodes/
    git clone https://github.com/Aljnk/ComfyUI-JNK-Tiny-Nodes.git
    

    Runs on PIL, which ComfyUI already ships - none of the pack's pip extras are required for this one.

    Where people get burned

    The min-size floor of 4px catches people who want a tiny 1×1 test image - you can't have one; that's deliberate, the pack author set a sane minimum. The bigger gotcha is expecting the color fill to preserve transparency: fill_type: color is opaque by definition, so you can't get a 50%-tinted overlay out of it directly. And remember the output has four channels - if you wire it into a node that wants plain RGB it may complain, but that's an input mismatch, not the node's fault. For a transparent base layer to composite on, set empty, and you're set.

    Category🔧 JNK

    Inputs (4)

    NameTypeDefaultDescription
    custom_widthINT5124–99999
    custom_heightINT5124–99999
    fill_typeCOMBO2 options: empty, color
    colorSTRING#ffffff

    Outputs (1)

    NameTypeDescription
    imageIMAGE