Checkerboard Pattern (Purz)
The calibration square, generator
- image
A checkerboard is the Swiss Army knife of test patterns: it's what you generate when you want to check a model's sharpness, sanity-check a resize pipeline, or build a texture from scratch. PurzCheckerboardPattern is the boring, dependable version - you give it dimensions, a square size, and two colors, and it hands you an IMAGE that is exactly what it says on the tin.
It's the static sibling of the pack's Animated Checkerboard node, and it's the kind of tiny utility you'd expect from ComfyUI-Purz, the pack by PurzBeats (a Comfy Org staffer): no fuss, no dependencies beyond what ComfyUI already has.
Why you'll use it
Two jobs, really. The first is testing: drop a checkerboard in front of an upscaler or a sharpening pass and you can see exactly what it's doing to edges, because the pattern is nothing but edges. The second is texture work - a checkerboard is a classic starting texture for img2img or as a base for pattern-mixing math nodes, and because you control square_size and both colors, you can build everything from fine calibration grids to bold gingham.
How it works
Pure Pillow drawing, looped batch_size times. For each frame it creates an RGB canvas at your width×height, fills alternating squares with color1 and color2, converts to a tensor, and stacks the batch. There's no resampling, no interpolation, no AI anything - which means the output is crisp at any resolution, and the render is effectively instant even at the top end of the size range.
The inputs that matter
- width / height - canvas size, 64–4096 in steps of 8.
- square_size - the size of each checker tile, 8–256. This is the one that changes the character of the pattern: small squares read as calibration texture, big squares read as graphic design.
- color1 / color2 - hex colors, e.g.
#FFFFFF/#000000. You can go wild - the classic is black and white, but a red/cream checker is a perfectly good picnic table. - batch_size - 1–16, how many identical frames to generate. Handy if you need a batch for a video or batch-driven workflow.
Output is image, an IMAGE tensor. Feed it to a save node, an img2img sampler, or an upscaler - anywhere an image can go.
Installing it
ComfyUI Manager - search ComfyUI-Purz - or:
cd ComfyUI/custom_nodes/
git clone https://github.com/purzbeats/ComfyUI-Purz.git
cd ComfyUI-Purz
pip install -r requirements.txt
Restart ComfyUI. Requirements are OpenCV, Pillow, torch, numpy - all standard, no model downloads.
The one thing to know
There's no "seamless tile" toggle - if you plan to use the checkerboard as a repeating texture, make sure width and height are clean multiples of square_size (times two, since a full cycle is two squares). Otherwise the last row or column gets cut off mid-tile and the tiling will have a visible seam. It's a one-line fix: 512×512 with a 32-px square works perfectly; 500×500 doesn't. That's about the only way to get this node wrong.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 51264–4096 | — |
| height | INT | 51264–4096 | — |
| square_size | INT | 328–256 | — |
| color1 | STRING | #FFFFFF | — |
| color2 | STRING | #000000 | — |
| batch_size | INT | 11–16 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |