ComfyUI Node

Image Solid

A solid color image that also matches your reference's dimensions

By 1hew·Created about a year ago·Updated 7 days ago· 33
Image Solid
  • get_image_size
  • image
  • mask
preset_sizecustom
width1024
height1024
color1.0
alpha1.00
invertfalse
mask_opacity1.00
divisible_by8

Sometimes you just need a plain canvas. A solid color background to composite on, a blank image to force a batch to a size, a full-white mask placeholder. Image Solid (1hew_ImageSolid) is the 1hewNodes answer: it generates a solid-color image at preset or custom dimensions, plus an optional matching solid mask, with the color parser and dimension presets that this pack is known for.

The reason to pick it over a generic "solid image" node is the reference-image trick: connect an image to the get_image_size input and it generates one solid canvas per input frame at that exact size. That's the single feature that makes it worth reaching for over the built-in options - matching a canvas to a batch of images without doing the size math yourself.

How it works

It fills a tensor with your parsed color, and separately builds a mask filled to mask_opacity (default 1.0). Three inputs do most of the work:

  • preset_size - a long combo of dimension presets covering 1:1, 4:3, 3:2, 16:9, 9:16 and the taller ratios, from 256² up to 2560×1440. Pick one and width/height are ignored. Set to custom to use the sliders.
  • color - the flexible one. "0.0" is black, "1.0" white, any 0–1 gray works, hex (#ff0000), r,g,b triples, color names, even single letters (k = black, w = white, r = red). Default "1.0" (white).
  • get_image_size (optional) - the reference-image input. When connected, every other sizing input is bypassed and output size matches the reference(s).

The remaining knobs are straightforward: width/height (1–8192) for custom mode, alpha multiplies the color channels, invert flips the color, mask_opacity controls the mask fill, and divisible_by (default 8) rounds dimensions up to a multiple - handy for feeding models that want 8- or 16-aligned sizes.

Inputs and outputs

  • image - the solid color tensor.
  • mask - a solid mask at mask_opacity, same dimensions.

Installing it

It's part of the 1hewNodes pack:

cd ComfyUI/custom_nodes
git clone https://github.com/1hew/ComfyUI-1hewNodes

or via ComfyUI Manager ("1hewNodes"), then restart. No models.

Where it fits

Three uses stand out. Composite backgrounds: solid canvas behind a cutout while you preview. Batch alignment: run a batch of images through, reference one, and get a matching blank for every frame. And the underrated one - invert + mask_opacity turns it into a quick "solid mask" generator for testing mask-based nodes without hand-drawing anything. The preset list is oddly specific (a lot of Qwen/Gemini-era model ratios), which tells you the pack's other resize nodes were built for the same family of workflows - if a resize node's preset is unfamiliar, the matching entry lives right here.

Category1hewNodes/image

Inputs (9)

NameTypeDefaultDescription
preset_sizeCOMBOcustom43 options: custom, 256×256 [1:1.00] (1:1), 512×512 [1:1.00] (1:1), 768×768 [1:1.00] (1:1), 1024×1024 [1:1.00] (1:1), 1328×1328 [1:1.00] (1:1), +37
widthINT10241–8192
heightINT10241–8192
colorSTRING1.0
alphaFLOAT1.000–1
invertBOOLEANfalse
mask_opacityFLOAT1.000–1
divisible_byINT81–1024
get_image_sizeoptIMAGE

Outputs (2)

NameTypeDescription
imageIMAGE
maskMASK