Create Solid Mask
A blank canvas of white (or black, or anything in between)
- MASK
Create Solid Mask generates a mask that is one solid value everywhere: a rectangle filled with a single number. On its own it does nothing interesting - that's the point. It's a canvas, and it's the node you reach for whenever you need to build a mask from scratch rather than draw one, or when a workflow needs a mask where only a shape will do.
Why you'll reach for it
Masks in ComfyUI are [B,H,W] float tensors - 1.0 white means "regenerate here," 0.0 black means "keep." Most masks come from painting, from LoadImage's alpha output, or from a SAM/segmentation node. But sometimes you need a mask that is nothing but white or nothing but black, at a specific size, with no image to derive it from. That's this node.
The two cases that actually come up:
- A full-white mask. White everywhere means "regenerate everywhere." It's the "mask everything" signal - useful for forcing a full img2img pass where a workflow stubbornly demands a mask input, or as the destination canvas you then paste smaller masks onto.
- A full-black mask. Black everywhere means "touch nothing." It's a mask that protects everything, handy when a pipeline expects a mask input and you want it to do nothing, or as a neutral starting point before you composite a region in.
The less obvious use is the value slider. You can make a uniform grey mask - say 0.5 everywhere. Because masks are floats, a half-grey mask fed to an inpaint encoder behaves differently from white or black, and a solid grey is a legitimately useful "regenerate at half intensity" kind of signal in some VAE-encode setups. Don't overthink it; but know the dial exists.
How it works
The implementation is a single torch.full call: a 1xHxW tensor filled with your value, created on the intermediate device. That's the whole mechanism - there's no model, no sampling, no file. It's instant, it uses almost no VRAM, and it can't fail. The output batch size is exactly 1.
The inputs that matter
value- the fill value, 0.0 (black) to 1.0 (white), default 1. Step of 0.01, so you can hit any grey you want.widthandheight- canvas size in pixels, default 512x512. Max 16384 on either side.
One output, MASK. Note there's no batch or count input - you get one mask, and you repeat it yourself if you need several.
Getting it
Core ComfyUI, nothing to install. It's in comfy_extras/nodes_mask.py with the rest of the mask family. It's the kind of node you forget exists until a workflow graph asks you for "a mask" and you realize you have nothing to feed it.
Where people get burned
- It's a canvas, not a finished mask. A solid mask is the start of a mask workflow, not the end. The actual shape you want comes from
MaskCompositepasting a region mask onto it, or fromCropMask/GrowMaskshaping it. People who connect SolidMask straight to a sampler and wonder why the whole image changed are using it wrong. - Size mismatch bites. If the downstream node expects a mask the same size as your image and you made a 512 canvas for a 1024 image, you get a shape error or silent weirdness. Set width/height to match your latent or image.
- Grey is not a bug. A
valueof 0.5 is a legitimate intermediate - if your result looks half-affected, that's the value doing its job, not a malfunction.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| value | FLOAT | 1.000–1 | — |
| width | INT | 5121–16384 | — |
| height | INT | 5121–16384 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MASK | MASK | — |