Create QR Code
Generate a scannable code to feed your workflow
- IMAGE
This one's a bit of an odd duck in a pack otherwise built around masking, but it earns its place: Create QR Code generates a plain, standard, scannable QR code image directly inside your graph, no external tool or website needed. Type your text or URL, set a few standard QR parameters, and get an IMAGE out that any phone camera can read.
Be clear about what this node is not: it's not the "QR code art" thing you've probably seen where a QR code is fused into an artistic image and still scans. That trick uses a QR code as a ControlNet conditioning input - typically a brightness-pattern ControlNet - with a normal generation prompt layered on top, so the model paints artistic detail while the QR's light/dark structure survives underneath. This node makes the plain QR code that feeds into that pipeline; it doesn't do the artistic fusion itself. If you're chasing the ControlNet QR-art look, this is step one, not the whole workflow - and worth knowing going in, that particular style of ControlNet (QR-code/brightness conditioning) only exists trained for SD 1.5 and SDXL; nobody has retrained it for the newer base models, so pair this node's output with an SD 1.5/SDXL ControlNet stack if that's the effect you're after.
The inputs that matter
- text - the content to encode: a URL, a message, whatever needs to be scannable.
- size (INT, 64–4096, default 512) - the output image's height and width in pixels.
- qr_version (INT, 1–40, default 1) - QR's own versioning system, where a higher version packs more data into a denser grid. Leave it at 1 unless your text is long enough that generation fails - the node will need a higher version to fit more data.
- error_correction -
L,M,Q, orH(defaultH), the standard QR error-correction levels. Higher levels (Hespecially) make the code more resilient to damage or partial obstruction - useful headroom if you're about to run this through a ControlNet pipeline that adds visual noise on top. - box_size (default 10) and border (default 4) - how large each QR module renders in pixels, and how much quiet-zone border surrounds the whole code. These interact with
sizeto determine how dense/legible the final scan target looks; if a generated code isn't scanning reliably, largerbox_sizeand moreborderare the first things to try.
Output is a single IMAGE - the rendered QR code, ready to save, preview, or hand to a ControlNet preprocessor/apply node.
Installing it
Create QR Code comes with Masquerade Nodes. Install via ComfyUI Manager (search "Masquerade Nodes") or manually: cd ComfyUI/custom_nodes && git clone https://github.com/BadCafeCode/masquerade-nodes-comfyui, then restart ComfyUI. Unlike most of the rest of the pack, this specific node isn't dependency-free in practice: it installs the qrcode Python package automatically the first time you use it. That install happens transparently in most setups, but if your ComfyUI environment can't reach PyPI (a locked-down or offline install), expect this node to fail on first use until that package is available some other way.
Common issues
If the node errors out the very first time you run it, check whether it's a failed background pip install rather than a problem with your inputs - restricted, sandboxed, or offline environments are the most likely cause, since this node reaches out to install qrcode on demand rather than shipping it as a bundled dependency. If your generated code won't scan reliably once printed or displayed small, that's almost always error_correction set too low or border too thin - bump error correction to H and give it a proper quiet zone before assuming the encoding itself is broken. And if you're feeding long URLs or text and generation fails outright, raise qr_version - version 1 has a hard data ceiling and simply can't encode much text no matter what else you adjust.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| size | INT | 51264–4096 | — |
| qr_version | INT | 11–40 | — |
| error_correction | COMBO | H | 4 options: L, M, Q, H |
| box_size | INT | 101–100 | — |
| border | INT | 40–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |