Nodes/ComfyQR/QR Code (Split)
ComfyUI Node

QR Code (Split)

QR Code (Split) — the parts-and-parcels node for QR art that actually scans

By coreyryanhanson·Created 3 years ago·Updated 2 years ago· 90
QR Code (Split)
    • QR_CODE
    • MODULE_LAYER
    • FINDER_LAYER
    • FINDER_MASK
    • QR_VERSION
    • IMAGE_SIZE
    protocolHttps
    text
    module_size16
    max_image_size512
    fill_hexcolor#000000
    back_hexcolor#FFFFFF
    error_correctionHigh
    border1
    module_drawerSquare

    "QR Code (Split)" is the same QR generator as the plain module-size node - same inputs, same crisp native rendering - except it hands you the QR cut into pieces. You get the full code, a module layer, an isolated finder layer, and a mask that marks exactly where the three corner finder patterns live. It sounds like a gimmick until your pretty QR art refuses to scan, and then it's the node you wanted all along.

    Why the finder patterns matter: those three corner squares are the first thing any QR reader locks onto. Diffusion doesn't know or care - it'll happily paint flowers straight through them - and a wrecked finder pattern means the camera never even gets to the data. This node exists so you can protect exactly those regions.

    The extra outputs beyond QR_CODE:

    • MODULE_LAYER - the QR with the function/finder patterns filled with the back color, so they don't interfere with the early diffusion steps.
    • FINDER_LAYER - just the three finder patterns, isolated over the back color.
    • FINDER_MASK - a white mask over exactly the finder-pattern squares plus the border you set.

    The mechanism is simple and robust: it computes the three finder regions (7 modules plus border, at the corners) as a boolean mask, then paints the back color through it to build the two layers. Nothing clever, nothing fragile - which is what you want from something this structural. QR_VERSION and IMAGE_SIZE outputs are identical to the base node.

    How people actually use it: composite MODULE_LAYER into an img2img pass so the function patterns stay intact while the art fills the data area, then use FINDER_MASK to keep denoising strength low over the corners. It pairs naturally with the pack's "Mask QR Errors" node - generate, measure where the pattern broke, and re-touch only the failing modules. The README's example workflows show exactly this loop: take a code that doesn't scan, crank ControlNet strength on just the error pixels, and end up with something that reads reliably across different monitors.

    Honest advice: if you're new to this, don't start here. The plain "QR Code" node is the same generator without the extra outputs, and you can always swap Split in later. Come to Split when your art is pretty but dead on arrival at the scanner.

    Install is the pack-wide one: ComfyUI Manager → search "ComfyQR", or

    cd ComfyUI/custom_nodes
    git clone https://github.com/coreyryanhanson/ComfyQR
    

    then restart. Dependencies are qrcode and pillow - no model files, no API keys. The repo is mirrored from GitLab, so that's where issues and PRs go.

    Troubleshooting here is the same as the base node: the max_image_size guardrail halts the pipeline rather than silently shrinking the code, so when a long URL errors out, raise the cap or trim the text. And since this is the advanced variant, remember the stylized module drawers will nudge your numbers if you measure them later - square keeps everything clean.

    CategoryComfyQR

    Inputs (9)

    NameTypeDefaultDescription
    protocolCOMBOHttps3 options: Http, Https, None
    textSTRING
    module_sizeINT161–64
    max_image_sizeINT51264–4096
    fill_hexcolorSTRING#000000
    back_hexcolorSTRING#FFFFFF
    error_correctionCOMBOHigh4 options: Low, Medium, Quartile, High
    borderINT10–100
    module_drawerCOMBOSquare6 options: Square, Gapped square, Circle, Rounded, Vertical bars, Horizontal bars

    Outputs (6)

    NameTypeDescription
    QR_CODEIMAGE
    MODULE_LAYERIMAGE
    FINDER_LAYERIMAGE
    FINDER_MASKMASK
    QR_VERSIONINT
    IMAGE_SIZEINT