Nodes/ComfyUI-gen2/Gen2 Checkerboard
ComfyUI Node

Gen2 Checkerboard

The 30-second calibration pattern generator

By petmycat·Created 7 months ago·Updated 12 days ago· 23
Gen2 Checkerboard
    • image
    width512
    height512
    block_size64

    Sometimes you just need a checkerboard. Testing whether a ControlNet preprocessor is outputting sane edges, checking that a VAE encode/decode round-trip isn't scrambling geometry, eyeballing alignment on a test workflow - a clean grid of black and white squares is the fastest honest test pattern there is, because any distortion is instantly obvious. This node generates one, on demand, at whatever size you want. That's the whole job, and it does it in about thirty lines.

    What it does

    Three inputs, all integers, none of them interesting to get wrong:

    • width and height - image dimensions, default 512 each, up to 8192.
    • block_size - the size of each square in pixels, default 64.

    Each square in the output is block_size × block_size pixels, alternating black and white across the grid. (The README describes it as "1px black & white squares", but the shipped code sizes the squares from block_size - with the default 64 that's 8×8 squares in a 512×512 image.)

    The single output is image in standard ComfyUI format: a (B, H, W, C) float32 tensor in [0, 1], expanded to three identical RGB channels. So it wires straight into anything expecting an IMAGE - a control_image input, a preview node, a VAE encoder, whatever. It's a pure generator: no models, no files, no VRAM beyond a negligible tensor, and it's deterministic in the boring way (same inputs, same pattern).

    Wiring it in

    There's no clever setup. Drop it on the canvas, set your size, connect the image output where you need a test image. If you're checking a ControlNet workflow, a checkerboard is a better probe than a random photo for a lot of purposes: the hard vertical and horizontal edges make it obvious whether the preprocessor is respecting structure or hallucinating. For round-trip tests, run it through your VAE encode/decode and compare - square edges that come back wavy are a tell.

    Installation

    It ships in the petmycat/ComfyUI-gen2 pack. Install via ComfyUI Manager (search "ComfyUI-gen2"), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/petmycat/ComfyUI-gen2
    cd ComfyUI-gen2
    pip install -r requirements.txt
    

    Restart. This node is in the utilities section, which has no extra dependencies - nothing beyond the pack install is needed.

    Common issues

    Honestly, not much goes wrong here. The input ranges are clamped (width/height up to 8192, block size up to 4096), so you can't blow yourself up with a typo'd million-pixel tensor, and the node has no state to desync. If you need a checkerboard and this is installed, it just works. If you need anything fancier - grayscale ramps, color bars, a resolution test chart - you'd reach for a different utility, but for a clean black-and-white grid this is the one.

    CategoryGen2/Utils

    Inputs (3)

    NameTypeDefaultDescription
    widthINT5121–8192
    heightINT5121–8192
    block_sizeINT641–4096

    Outputs (1)

    NameTypeDescription
    imageIMAGE