Nodes/ComfyUI-Simple_QR_Codes/πŸ›Έ QRCodes (Segno Simple Logo)
ComfyUI Node

πŸ›Έ QRCodes (Segno Simple Logo)

Segno's crisp rendering, with a logo in the middle

By zentrocdotΒ·Created 2 years agoΒ·Updated 2 years agoΒ· 2
πŸ›Έ QRCodes (Segno Simple Logo)
  • image
  • IMAGE
  • MASK
  • INVERTED_MASK
β—„darkNoneβ–Ί
β—„lightNoneβ–Ί
β—„textβ–Ί
β—„width512β–Ί
β—„height512β–Ί
β—„scale4β–Ί
β—„error_correctβ–Ύβ–Ί
β—„versionβ–Ύβ–Ί
β—„border4β–Ί
β—„data_darkdarkorangeβ–Ί
β—„data_lightyellowβ–Ί
β—„alignment_darkdarkgreenβ–Ί
β—„alignment_lightpalegreenβ–Ί
β—„version_darkperuβ–Ί
β—„version_lighttanβ–Ί
β—„finder_darkdarkblueβ–Ί
β—„finder_lightlightblueβ–Ί
β—„format_darkindigoβ–Ί
β—„format_lightmagentaβ–Ί
β—„timing_darkmediumvioletredβ–Ί
β—„timing_lightpinkβ–Ί
β—„separatorazureβ–Ί
β—„dark_moduleblackβ–Ί
β—„quiet_zonelightyellowβ–Ί
β—„width_height_logo256β–Ί
β—„mask_colorβ–Ύβ–Ί

The best of both halves of the pack

ComfyUI-Simple_QR_Codes ships two QR engines. The qrcode family is easy but generates small and resizes up, which softens the modules; the segno family renders at true native resolution, so big codes stay crisp. QRCodes (Segno Simple Logo) is where the pack combines its two selling points: segno's sharp rendering and a logo pasted dead-center. If you want a branded, scannable QR at poster size without the upscale blur, this is the node for it.

How it works

Same shape as the other segno nodes - segno.make(text, version, error) rendered via to_pil at your scale - but with the full region-color control set exposed (data, finder, alignment, timing, format, version, separator, dark module, quiet zone, all as CSS color names; dark/light master defaults are "None", letting segno pick). Then your optional image is resized to width_height_logo pixels and pasted centered on top.

The default width_height_logo here is 256 - four times the 64 that the qrcode-family logo node uses, so the logo starts out aggressively large. Keep in mind that whatever sits in the middle overwrites data modules, and segno's error-correction default is H (30% recovery) - genuinely the right default, and worth keeping when a logo is in play. The qrcode-family logo node, by contrast, defaults to the weakest correction level; this node does not have that trap.

Two quirks to know. First, if you leave image unwired it still needs something to paste, so it builds a placeholder from the light color - but light defaults to "None", which fails the color parse and lands on gray. So a missing image gives you a gray square, not a transparent one; wire in real art or set light to a real color. Second, mask_color (red/green/blue enum) selects which channel feeds the MASK/INVERTED_MASK outputs, same as the rest of the segno family.

Outputs

IMAGE, MASK (the QR pattern), INVERTED_MASK (the background) - the masks being useful if you want to composite the logo'd code over another graphic, or mask it during a ControlNet pass.

Where it bites

  • DataOverflowError on the defaults - version defaults to 1 and segno raises if the text doesn't fit. Any URL needs a higher version (2–5 is typical).
  • Unwired image β†’ gray square - see above. Feed it a real logo.
  • Too-big logo kills scanability - 256px default is a lot on a 512px canvas; keep the logo under ~15–20% of the code's width, keep error correction at H, and verify with the pack's QRCodeReader node before you print.

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

Requires segno and segno-pil plus the pack's shared pins (qrcode 8.0, pillow 10.4.0, opencv-python). No model downloads. You'll find it under QR Code Nodes β†’ segno-based after restart.

Category🍭 QR Code Nodes/πŸš‚ segno-based

Inputs (27)

NameTypeDefaultDescription
darkSTRINGNoneβ€”
lightSTRINGNoneβ€”
textSTRINGβ€”
widthINT5121–8192β€”
heightINT5121–8192β€”
scaleINT40–1024β€”
error_correctCOMBO4 options: H, Q, M, L
versionCOMBO40 options: 1, 2, 3, 4, 5, 6, +34
borderINT40–8192β€”
data_darkSTRINGdarkorangeβ€”
data_lightSTRINGyellowβ€”
alignment_darkSTRINGdarkgreenβ€”
alignment_lightSTRINGpalegreenβ€”
version_darkSTRINGperuβ€”
version_lightSTRINGtanβ€”
finder_darkSTRINGdarkblueβ€”
finder_lightSTRINGlightblueβ€”
format_darkSTRINGindigoβ€”
format_lightSTRINGmagentaβ€”
timing_darkSTRINGmediumvioletredβ€”
timing_lightSTRINGpinkβ€”
separatorSTRINGazureβ€”
dark_moduleSTRINGblackβ€”
quiet_zoneSTRINGlightyellowβ€”
width_height_logoINT2560–1024β€”
mask_colorCOMBO3 options: red, green, blue
imageoptIMAGEβ€”

Outputs (3)

NameTypeDescription
IMAGEIMAGEβ€”
MASKMASKβ€”
INVERTED_MASKMASKβ€”