Nodes/ComfyUI-MatAnyone/Solid Color Batched
ComfyUI Node

Solid Color Batched

The tiny node that gives MatAnyone its green screen

By FuouM·Created about a year ago·Updated 6 months ago· 102
Solid Color Batched
    • solid
    batch_size1
    height720
    width1280
    red0
    green255
    blue0

    This is the least glamorous node in the ComfyUI-MatAnyone pack, and it's also the one that makes the rest of it convenient. Solid Color Batched just generates a stack of solid-color frames - by default a green 1280×720 image - and hands them to you as an IMAGE batch. A few dozen lines of tensor math, nothing to learn.

    So why does it ship in a video-matting pack? Because the MatAnyone and MatAnyone2 nodes can composite your cutout over a backdrop, but only if you give them one. Their green_screen output is computed as foreground × alpha + (1 − alpha) × solid_color, and in the source it stays an empty tensor if you never wire solid_color in. The README's "defaults to Green Screen" describes the example workflow, not the code - that workflow gets its green from this node. The pack ships the utility that makes its own sentence true.

    Inputs and output

    Every input is an integer and every one is obvious:

    • batch_size - how many identical frames to make (default 1)
    • height / width - frame size (default 720×1280)
    • red / green / blue - the color, 0–255 (default 0 / 255 / 0, actual green screen green)

    The single output is solid, an IMAGE tensor. There's no model, no checkpoint, no state.

    How it works

    Basically how it looks: it fills a float32 tensor of shape (batch_size, height, width, 3) with your RGB values normalized from 0–255 to 0–1, repeating the color across every frame so each frame of your video gets the same backdrop. Wire solid into the solid_color input of MatAnyone or MatAnyone2 and you're done - because the node repeats the one image across the whole batch, you never have to think about matching frame counts. Want a blue or white screen instead? Change the RGB values. That's the entire API.

    Install

    Installation is whatever you did for the pack - this node has no dependencies of its own. Search "ComfyUI-MatAnyone" in ComfyUI Manager, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/FuouM/ComfyUI-MatAnyone
    

    then restart. No model download needed for this one.

    Is it essential? No. Any solid IMAGE of the right resolution works, and if you're compositing properly afterward you might want just the matte and skip the greenscreen composite entirely. But for a quick "put this dancer on a green screen" test, it's the difference between wiring one node and hunting for something that makes a flat color. Boring nodes that remove friction still earn a slot in the toolbar.

    CategoryMatAnyone

    Inputs (6)

    NameTypeDefaultDescription
    batch_sizeINT1
    heightINT720
    widthINT1280
    redINT0
    greenINT255
    blueINT0

    Outputs (1)

    NameTypeDescription
    solidIMAGE