Nodes/D2 Nodes ComfyUI/D2 EmptyImage Alpha
ComfyUI Node

D2 EmptyImage Alpha

Blank canvas, but this one has an alpha channel

By da2el-ai·Created 2 years ago·Updated about a month ago· 66
D2 EmptyImage Alpha
  • sample
  • IMAGE
width512
height512
batch_size1
red0
green0
blue0
alpha1.000
output_alphatrue

ComfyUI's stock EmptyImage gives you a solid RGB rectangle and nothing else. D2 EmptyImage Alpha is the same idea but with an alpha channel, so you can start a workflow from a transparent image - think stickers, icons, PNG exports, compositing, or anything you'll later paste over another image. Where it shines is as the clean start of an alpha-focused pipeline: generate into transparency, composite the result, and save a PNG that actually has real transparent pixels instead of a baked-in background.

It's a small node, but "transparent blank" is one of those things you keep needing and keep hand-assembling out of three nodes otherwise. This is one node, all RGB + alpha in one output.

The inputs

  • width / height - canvas size, up to 16384.
  • batch_size - how many identical blank images to make. Default 1.
  • red / green / blue - fill color as 0–255 values. Defaults to black.
  • alpha - the alpha value for the fill, 0.0 to 1.0. Default 1.0 (fully opaque), drop it toward 0 for a fully transparent canvas.
  • output_alpha - the one that trips people up. When false, the node outputs plain 3-channel RGB with no alpha at all. Why would you want that? Some nodes refuse 4-channel input - the pack's own docs name Anima ControlNet-LLLite - so output_alpha is the escape hatch for feeding "blank with color" into RGB-only consumers.
  • sample - a color swatch widget (D2_COLOR_CANVAS) for picking the fill color visually instead of typing three ints.

Output

Just one: IMAGE, the blank canvas (RGBA by default, RGB when output_alpha is off).

Installing it

It ships in the D2 pack. ComfyUI Manager → search "D2-nodes-ComfyUI" → install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/da2el-ai/D2-nodes-ComfyUI

Restart after. No models, no heavy dependencies - piexif and charset-normalizer are the whole requirements list. Since v32.0.0 the pack wants a recent ComfyUI (V3 schema); on older builds, pin the pack before 32.0.0.

Where people get burned

The alpha slider lives at 1.0 by default, so if you set a color and expect to see through it, you won't until you also drop alpha. And when an image comes out with a weird black square where transparency should be, the usual culprit is a downstream node that flattened 4 channels - toggle output_alpha and check whether the consumer actually accepts RGBA before you blame the canvas.

CategoryD2/Image

Inputs (9)

NameTypeDefaultDescription
widthINT5121–16384
heightINT5121–16384
batch_sizeINT11–4096
redINT00–255
greenINT00–255
blueINT00–255
alphaFLOAT1.0000–1
output_alphaoptBOOLEANtrue
sampleoptD2_COLOR_CANVAS

Outputs (1)

NameTypeDescription
IMAGEIMAGE