Integrating Artistic QR Codes Using AI

Gustavo Salas
The Lab @ Apply Digital
3 min readJan 24, 2024

QR codes are the modern bridge to streamline communication between the physical world and the digital one. However, they still look like an afterthought in the corner of a graphic piece, disrupting the intended reading flow of an image (and making our graphic designers and artists cry).

Our objective was to leverage AI to produce a QR code that was beautiful as a standalone piece while maintaining its readability, becoming part of the message where it is embedded. We initially explored existing products that could help us create artistic QR Codes using AI.

AI tools have been evolving at breakneck speeds, so there must be tools that could provide what we envisioned, but after testing more than ten different AI-powered QR code generator software, most produced either generic results or unreadable QR codes. Only one tool generated decent outcomes, but only when specific styles were used with our prompts, like fantasy, anime, or robots.

Generated in QR Code AI

After this ‘walk in the desert’ experience, we began experimenting with Stable Diffusion online via Run Diffusion, which improved results but left the QR code somewhat separate from the visual output. While it blended our vision better, achieving the desired outcome required further exploration.

Local Stable Diffusion UI

As working with Run Diffusion became more challenging — due to the original checkpoint tested being removed — the settings we’d been testing no longer provided the results we were after, so we decided to take Stable Diffusion local. However, running locally required immense computing power and was very slow. Setting it up required downloading several checkpoints, models, and preprocesses. The whole process was technically demanding and painfully slow.

As we were trying to optimize the procedure, we found another online tool called “Think Diffusion”, that uses Stable Diffusion to create custom outputs with a similar but more user-friendly interface than Run Diffusion. This online tool also featured a pricing model reminiscent of old-school internet cafes, charging for the time you use the app (versus the others, which all charged per image). Think Diffusion broke its process down into two workflows:

  1. Text-to-Image: Generates an image alongside the QR code, merging the two.
  2. Image-to-Image: Blends an existing image with the QR code via ControlNet, a neural network structure that allows us to fine-tune (further testing is required as this round provided results that either looked good, but the QR code wasn’t scannable or they were scannable but looked odd).

So where did we end up? In certain circumstances, you can quickly and easily generate custom QR codes as long as your desired output is within a small list of preset themes. For the majority of use cases, it’s possible, but it requires time to experiment and fine-tune to create consistent, high-quality outputs. Along the way, we’ve learned that specific scenarios won’t work; for example, images without high contrast cannot produce a scannable code. But even a perfect starting image needs help to become a great-looking QR code.

Left was generated with Stable Diffusion and the right was edited so it was scannable.

The quest for the ideal technique to use generative AI in producing artistic QR Codes on demand continues. If you’re interested in a tool like this for your brand, we’re ready to help craft one for your specific needs.

--

--