LayerUtility: Decode QRCode(Advance)
Decode QRCode — read a QR pattern back out of an image
- image
- string
The other half of CreateQRCode: feed it an image, get back whatever text is encoded in the QR pattern, as a plain string. Same no-model, no-API-key deal as its sibling - this runs entirely on the CPU with a standard QR reader, no downloads, no GPU cost.
Where this actually earns its place is verification. If you're doing anything with QR codes in a generative pipeline - the classic "art that's also a scannable code" trick built around ControlNet, or the pack's own blind-watermark feature, which encodes text as a QR code before hiding it invisibly inside an image - you want a way to confirm the code still reads before you find out the hard way (a phone that won't scan it, or a customer who can't open your link). This node is that check, run inside the same graph instead of pulling out your phone.
The inputs and outputs that matter
image- the image containing the QR pattern you want decoded.pre_blur- a blur pass applied before decoding, 0–16, default 2. Counterintuitive at first: why would blurring help you read something? Because a QR code that's survived being painted over by a diffusion model isn't crisp black-and-white blocks anymore - it's noisy, textured, full of small generation artifacts that can confuse a QR reader's edge detection. A light blur smooths that noise out and can make the underlying grid easier to lock onto. For a clean, unmodified QR image, leave it low or at 0.
Output is a single string - the decoded text, or empty/failed if nothing readable was found.
How to install it
Recommended: ComfyUI Manager, search "ComfyUI Layer Style Advance". Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/chflame163/ComfyUI_LayerStyle_Advance.git
Then run install_requirements.bat / install_requirements_aki.bat, or install requirements.txt manually and run repair_dependency.bat. Restart. Nothing model-related to download for this specific node.
Common issues & troubleshooting
Decode comes back empty on an AI-generated "hidden QR" image. Try raising pre_blur a few steps at a time - the README specifically flags this parameter as the thing to adjust "for QR codes that are difficult to identify," which is exactly the case where a diffusion pass has roughened the pattern.
Decode comes back empty on a fresh, unmodified QR image (like this pack's own CreateQRCode output, or ShowBlindWaterMark's recovered watermark). That's the useful failure mode - it tells you the problem is upstream, not in this node. Check the source image resolution isn't too small relative to the QR's density, and if you're chaining this after ShowBlindWaterMark, remember the README's own warning that watermarked images saved as JPEG (rather than PNG) can lose the embedded pattern to compression before you ever get to decoding it.
You need the exact recovered image, not just its text, before deciding whether to bother decoding. ShowBlindWaterMark gives you back an IMAGE, not a string - this node is the natural next step to turn that recovered pattern into readable text, so the two are meant to be chained rather than used interchangeably.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| pre_blur | INT | 20–16 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string | STRING | — |