π°οΈ QRCodes (Simple Logo)
Stick a logo in the middle of a QR code β and why you need H error correction
- image
- IMAGE
- MASK
- INVERTED_MASK
The "branded QR" node
QRCodes (Simple Logo) does one thing: takes your QR code, pastes a logo dead-center, and hands back a QR that actually looks like your brand instead of a stock barcode. It's the third node in the pack's qrcode-based family, and it's the one you reach for when the QR isn't going into a ControlNet art workflow but straight onto a poster, business card, or product label.
The mechanism is exactly what it sounds like. The node builds the QR with Python's qrcode library, resizes your logo to width_height_logo pixels (keeping aspect ratio), and pastes it in the middle of the code. No fancy blending, no alpha compositing - a straight paste. If you don't wire an image in at all, it draws a solid square in your fg_color as a placeholder, so the layout still works before you've picked art.
Why the defaults are a trap
The center of a QR code is where the data is most redundant - that's why logos work there at all - but it's also where error correction earns its keep. This node's error_correct dropdown defaults to ERROR_CORRECT_L, the weakest level (7% recovery). That's exactly backwards for a logo: you're about to destroy the densest part of the code, and L gives you the least safety net. Set error_correct to ERROR_CORRECT_H (30% recovery) before you add a logo. It's the single most important setting on this node, and the default will happily let you produce an unscannable QR.
The other trap is version, default 1 - the smallest QR. Add a logo, pick H error correction, and a version-1 code won't fit a URL at all; you'll get a DataOverflowError. For "logo + URL," expect to be up around version 3β5. General guidance that holds: keep the logo under ~15% of the QR's width, use H, and test the result with the pack's QRCodeReader node before you print it.
Inputs and outputs, quickly
text- payload.width/height- final canvas.fg_color/bg_color- tuple-style strings like"(0, 0, 0)", not hex, not CSS names.box_size- module size pre-resize; this one defaults to 25, higher than its siblings, so the base is fairly crisp before the stretch.width_height_logo- logo size in pixels (default 64).mask_color- a red/green/blue enum, and this time the name is honest: it picks which channel the masks are derived from.- Optional
image- your logo. Outputs:IMAGE,MASK,INVERTED_MASK(QR pattern vs. background, useful for compositing the logo'd code over other graphics).
Common issues
- Won't scan β error correction too low, or logo too big. H + smaller logo.
- "Data does not fit" β version too low for the text; raise it.
- Logo looks stretched β the node preserves aspect on the short side, so very wide or tall logos get letterboxed oddly. Use a roughly square logo.
Installing it
Part of ComfyUI-Simple_QR_Codes. ComfyUI Manager β search "Simple QR Codes" β install β restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/zentrocdot/ComfyUI-Simple_QR_Codes
cd ComfyUI-Simple_QR_Codes
pip install -r requirements.txt
No model downloads - it's all CPU-side PIL and qrcode (pinned to 8.0). Right-click in ComfyUI and you'll find it under QR Code Nodes β qrcode-based.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | β | |
| width | INT | 5121β8192 | β |
| height | INT | 5121β8192 | β |
| fg_color | STRING | (0, 0, 0) | β |
| bg_color | STRING | (255, 255, 255) | β |
| error_correct | COMBO | 4 options: ERROR_CORRECT_L, ERROR_CORRECT_M, ERROR_CORRECT_Q, ERROR_CORRECT_H | |
| version | COMBO | 40 options: 1, 2, 3, 4, 5, 6, +34 | |
| box_size | INT | 250β8192 | β |
| border | INT | 40β8192 | β |
| width_height_logo | INT | 640β8192 | β |
| mask_color | COMBO | 3 options: red, green, blue | |
| imageopt | IMAGE | β |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |
| MASK | MASK | β |
| INVERTED_MASK | MASK | β |