DY Binary Pattern Stamper
Tile a barcode/halftone texture, recolored from the image
- image
- IMAGE
DY Binary Pattern Stamper is the pack's weirdest node and honestly its most distinctive. It tiles your image with a binary black-and-white pattern - barcode stripes, halftone dots, that kind of thing - then recolors each stamped tile using the image color sampled at the tile's center. The result is a cross between a halftone print and a barcode collage, where the pattern texture stays crisp but every tile pulls its color from the image underneath. If you want that "printed on industrial material" or "scannable art" look, this is the node.
The pack ships 16 patterns in the node's own folder (br_0–br_9, h_1–h_6), all pure two-tone PNGs. The br_ set is barcode-ish (vertical stripes with lots of black), the h_ set is halftone-ish dot grids. Because the colors come from the image, swapping patterns changes the texture, not the palette - you can run the same image through all 16 and get a coherent family of looks. It's a niche tool, but there isn't really another node doing exactly this.
How it works
The mechanism: load the pattern as grayscale, upscale it by scale_multiplier with NEAREST (which keeps the edges hard and binary instead of mushy), lay out a grid of tile positions across the image, and for each position roll a random check - stamp_probability decides whether a tile gets stamped at all. Stamped tiles randomly flip horizontally/vertically based on the flip probabilities, and the pattern's white pixels become the sampled image color at full or jittered alpha, pasted onto a transparent overlay that's then composited back onto the original.
The inputs that matter:
- pattern - pick from the 16 bundled PNGs.
- scale_multiplier (1–32) - tile size; 1 uses the pattern at its native (small) resolution, higher values give bigger, chunkier tiles.
- stamp_probability (0–1, default 0.5) - fraction of grid cells that actually get a stamp. 0.5 gives a scattered feel; 1.0 is a full tight tile.
- flip_h_probability / flip_v_probability - per-tile mirroring, which breaks up the grid repetition.
- alpha / alpha_deviation - opacity of the stamped color.
- seed (-1 or any int) - here's the rare good news in this pack: this node has a seed input. -1 seeds from the clock; set a fixed number and the same arrangement reproduces exactly.
Gotchas
The patterns load from the pack's nodes/patterns/ folder at startup - the dropdown is generated by listing that directory, so the choices you see are literally the files that ship. Also worth knowing: it processes only the first image of a batch, and with scale_multiplier high and stamp_probability at 1.0, the texture completely dominates the source image. Start with stamp_probability around 0.5 and a small multiplier - that's the look the defaults are tuned for.
Install
Part of dymokomi/comfyui_dygen by Dy Mokomi. ComfyUI Manager → search "comfyui_dygen", or:
cd ComfyUI/custom_nodes
git clone https://github.com/dymokomi/comfyui_dygen
Restart. No extra deps, no model downloads - the patterns are bundled PNGs. (If the pattern dropdown ever comes up empty, the patterns folder is missing or wasn't cloned; re-clone to restore it.)
Bottom line
It's the pack's one genuinely original idea: a seeded, tileable, image-colored pattern stamper. Nobody reaches for it every day, but when the brief is "make this image look printed or scanned," it's exactly the tool, and the seed input means you can actually iterate on it instead of re-rolling the dice.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| pattern | COMBO | 16 options: br_0.png, h_4.png, br_9.png, h_5.png, h_6.png, br_2.png, +10 | |
| scale_multiplier | INT | 11–32 | — |
| stamp_probability | FLOAT | 0.500–1 | — |
| flip_h_probability | FLOAT | 0.000–1 | — |
| flip_v_probability | FLOAT | 0.000–1 | — |
| alpha | INT | 2550–255 | — |
| alpha_deviation | INT | 00–255 | — |
| seed | INT | -1-1–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |