π₯ CR Binary Pattern
A 1s-and-0s image with colors, outlines and jitter
- IMAGE
- show_help
This is the full-fat version of CR Simple Binary Pattern. Same core idea - a string of 1s and 0s becomes a grid - but here you get real control: separate colors for the 0 cells, the 1 cells, and the background, plus cell outlines, positional jitter, and a bias control. If Simple Binary Pattern is a monochrome sketch, this is the one you use when the pattern is going into an actual composition and needs to look intentional.
Good for stylized backgrounds, tileable motifs, structured masks, or a base layer you feed into a generation to nudge its structure.
How it works
It reads the binary_pattern string, lays it out as a grid on your canvas, and colors each cell by its value - 1s get color_1, 0s get color_0, everything behind gets background_color. On top of that it can outline each cell and apply a jitter offset so the grid feels less rigidly mechanical. It's PIL drawing, no model, instant.
The inputs that matter
binary_pattern(multiline STRING, default10101) - your 1s and 0s; multiple lines make a 2D grid.width/height(INT, default 512) - canvas size.color_0,color_1,background_color,outline_color- named-color dropdowns (30 each, includingcustom). Each has a matching optional hex field (color0_hex,color1_hex,bg_color_hex,outline_color_hex) that only applies when its dropdown is set tocustom.outline_thickness(INT, default 0) - 0 means no outline; raise it to draw borders around cells.jitter_distance(INT, default 0) - random positional offset per cell, for a looser, hand-placed feel.bias(FLOAT 0β1, default 0.5) - shifts the fill balance of the pattern.
Output is a single IMAGE (plus show_help, ignore it).
Installing it
Part of Comfyroll Studio (Suzie1 / RockOfFire), a large, established utility pack. Install through ComfyUI Manager (search "Comfyroll Studio," install, restart) or clone it:
cd ComfyUI/custom_nodes
git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git
then restart. No models, no dependencies.
Common issues
The recurring Comfyroll color trap bites hardest here because there are four color slots: each hex field is dead until its dropdown is switched to custom. If a color isn't taking, that's almost always why - check the dropdown, not the hex value.
Keep your pattern string to clean 1s and 0s, and make lines equal length for a tidy rectangular grid. If you want the plainest possible black-and-white result with none of these controls, the sibling CR Simple Binary Pattern is less to configure. And the standing pack note: a startup failure with a NameError traceback ("Failed to load Graphics nodes") is a broken install - reinstall cleanly through Manager and restart, don't chase it in the node.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| binary_pattern | STRING | 10101 | β |
| width | INT | 51264β4096 | β |
| height | INT | 51264β4096 | β |
| background_color | COMBO | 30 options: custom, white, black, red, green, blue, +24 | |
| color_0 | COMBO | 30 options: custom, white, black, red, green, blue, +24 | |
| color_1 | COMBO | 30 options: custom, white, black, red, green, blue, +24 | |
| outline_thickness | INT | 00β1024 | β |
| outline_color | COMBO | 30 options: custom, white, black, red, green, blue, +24 | |
| jitter_distance | INT | 00β1024 | β |
| bias | FLOAT | 0.500β1 | β |
| bg_color_hexopt | STRING | #000000 | β |
| color0_hexopt | STRING | #000000 | β |
| color1_hexopt | STRING | #000000 | β |
| outline_color_hexopt | STRING | #000000 | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |
| show_help | STRING | β |