Nodes/Comfyroll Studio/πŸŸ₯ CR Simple Binary Pattern
ComfyUI Node Runs on cloud

πŸŸ₯ CR Simple Binary Pattern

Turn a string of 1s and 0s into a black-and-white image

By Suzie1Β·Created 3 years agoΒ·Updated 2 years agoΒ· 1,287
πŸŸ₯ CR Simple Binary Pattern
    • IMAGE
    • show_help
    β—„binary_pattern10101β–Ί
    β—„width512β–Ί
    β—„height512β–Ί

    Type 10101, get a black-and-white pattern image. That's the entire idea, and it's weirdly handy. CR Simple Binary Pattern reads a string of 1s and 0s and paints it as a grid where 1 is one color and 0 is the other - a quick way to hammer out a checkerboard-ish mask, a tileable graphic, or a structured black/white input without opening an image editor.

    It's the stripped-down member of Comfyroll's binary-pattern pair. If you want colors, outlines, jitter, and all the trimmings, that's the full CR Binary Pattern. This one is deliberately just: string in, B/W image out.

    How it works

    It parses your binary_pattern string and lays it out as a grid on a canvas of the size you set - each cell filled based on whether that position is a 1 or a 0. Pure PIL, no model, instant. A multiline string lets you define rows, so you can sketch a whole 2D pattern rather than a single repeating row.

    The inputs and outputs that matter

    • binary_pattern (multiline STRING, default 10101) - your 1s and 0s. Use multiple lines to build a 2D grid.
    • width / height (INT, default 512) - the output canvas size.

    Output is a single IMAGE (plus the show_help string, which you can ignore) - feed it to a preview, a mask conversion, or use it as a base to composite on.

    Installing it

    Ships in Comfyroll Studio (Suzie1 / RockOfFire), a large, established utility pack. Via 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 - it's pure Python image drawing.

    Common issues

    Keep the string to actual 1s and 0s - stray spaces or other characters are where a "why does my grid look wrong" moment comes from. If you want a rectangular 2D pattern, make each line the same length; uneven lines give uneven rows.

    If you were hoping to set the two colors, the outline, or add some randomness, you're looking at the wrong node - this "Simple" version is monochrome by design. Reach for the full CR Binary Pattern for color mapping and the extra controls. And the usual pack note: if Comfyroll fails to load at startup with a Python traceback about Graphics nodes, that's a broken install rather than this node - reinstall cleanly through Manager and do a full restart.

    Category🧩 Comfyroll Studio/πŸ‘Ύ Graphics/🌈 Pattern

    Inputs (3)

    NameTypeDefaultDescription
    binary_patternSTRING10101β€”
    widthINT51264–4096β€”
    heightINT51264–4096β€”

    Outputs (2)

    NameTypeDescription
    IMAGEIMAGEβ€”
    show_helpSTRINGβ€”