How To Turn QR Codes Into Amazing AI Art - 3 Easy Methods

Ambreen Khan
10 min readJun 23, 2023

--

QR codes are everywhere in our world today, helping us quickly find information and connect the real world with the digital world. But what if we said that QR codes can be more than just useful tools? With the incredible progress in artificial intelligence, we now have the power to transform QR codes into jaw-dropping works of art that will simply blow your mind. If you’re eager to learn this hottest trend of making AI QR code art, then congratulations! You’ve landed in the perfect spot. In this article, we’ll guide you through each step, showing you exactly how to create your very own AI QR code art. So get ready to wow your audience with AI QR code art!

Note: If you prefer a visual learning experience, feel free to check out this corresponding video on our YouTube channel LearningExpressway.

Here’s a summary of what we are going to cover in this article:

  • Introduction
  • What is a QR code?
  • What is AI QR code Art?
  • Creating Simple QR Code
  • Creating QR Code AI Art: Method 1 — HuggingFace Tool
  • Creating QR Code AI Art: Method 2 — QuickQR Art Discord Channel
  • Creating QR Code AI Art: Method 3 — QR AI Art Using StableDiffusion with ControlNet
  • Conclusion

What is a QR Code?

A QR code is a type of barcode that looks like a square filled with little black and white squares. When you scan or take a picture of a QR code using your smartphone or a QR code reader, it can quickly give you information or take you to a website without typing anything. It’s like a shortcut that connects the physical world to the digital world in an instant.

What is AI QR Code Art?

These are QR codes that are created using artificial intelligence models that have learned from many pictures. The result is a QR code that not only looks great but also serves a practical purpose. When you scan it, the QR Art takes you to a specific webpage, video, or other media. And because these QR codes are themselves stunning pieces of art worth admiring, it’s like getting two things in one package: functionality and beauty.

How to Create a Simple QR Code?

Before we dive into the process of creating AI Art from QR codes, let’s start by making a basic QR Code image. This image will be essential for generating QR Code AI Art later on when we learn how to create AI-based QR Code Art.

To generate the QR Code, you can utilize any QR code generator of your choice. We will use the Free QR Code generator from 34QR.com.

Steps:

  1. Navigate to the 34QR.com website
  2. Choose the type of text you want to encode and enter it in the QR Code Content Field.
  3. Adjust the fault tolerance setting to 30% (optional).
  4. Click on the “Generate” button.
  5. Once the QR Code is generated, you can download it as a PNG file.

Guidelines:

To achieve the best outcome, follow these guidelines when creating a QR code:

  1. Set the fault tolerance to a high level (30%).
  2. Opt for the simplest square filled with a black-and-white pattern.
  3. Be cautious of generators that may introduce thin white lines between black elements.

How to create QR Code AI Art?

Let’s now explore three different approaches to generate AI Art from QR Codes, starting from the easiest and gradually moving towards more advanced methods. So, let’s get started!

Method 1: Use QR Code AI Art Generator from HuggingFace

Setup Difficulty Level: Easy (No Setup Required)

Output: Starting with a basic quality, achieving stunning art quality requires some patience and experimenting with various parameters.

Restrictions: You are free to use the artwork without any watermark, allowing you to utilize it anywhere you desire.

How to create QR Art:

Here’s a step-by-step guide to creating QR Art using this tool:

  1. Visit the QR-code-AI-art-generator page on HuggingFace.
  2. Input your desired QR Code content or URL.
  3. Optionally, upload an existing QR Code image if you have one.
  4. Specify the value for the prompt and negative prompt, which helps guide the AI in generating the artwork.
  5. Adjust other parameters as desired.
  6. Click the “Run” button to initiate the creation process.

Guidelines:

To get better results from this tool:

  • Use a high strength value between 0.8 and 0.95
  • Choose a conditioning scale between 0.6 and 2.0.
  • If the generated image looks way too much like the original QR code, make sure to gently increase the strength value and reduce the conditioning scale.

Here are some QR Art pieces that I crafted using the AI Art Generator from HuggingFace! Each of these QR Codes leads directly to my YouTube Channel, Learning Expressway. Feel free to scan them and explore the exciting content I have to offer!

Method 2: Use QuickQR Art Discord Channel

QuickQR Art is a user-friendly website that assists brands in swiftly and effortlessly crafting distinctive and scannable QR codes. Currently, QuickQR Art is in the beta testing phase, and individuals can become part of the community to gain early access to the QR Art AI generator.

Setup Difficulty Level: Medium (Involves configuring your Discord profile)

Output: Exceptional Quality QR Art

Restriction: You will receive 25 QR Art designs with watermarks. If you wish to generate additional designs or obtain watermark-free artwork, kindly refer to the pricing section on the QuickQR Art website for further details.

How to create QR Art:

Here’s a step-by-step guide to creating QR Art using this tool:

  1. Visit the QuickQR.Art website.
  2. Click on the “Join Beta Now” button.
  3. You will receive an invitation from their Discord server. Accept the invite and complete the process of creating your Discord profile.
  4. Once your profile setup is complete, you are all set to create stunning QR Art.
  5. To learn more about using this command, you can also check the #how-to-use section.
  6. On the QuickQR Art Discord channel, navigate to #pixelml-bot-1. In the message box, type /qrart.
  7. Provide a description for your prompt and upload your QR Code file.
  8. After uploading the QR code file, hit enter.
  9. The Bot will begin processing your request. Once your QR Code AI image is ready, you will be able to view and click on your generated image.
  10. Finally, click on the generated image to save it to your device.

Sample Prompt: A 3D bookshelf, detailed art, fine illustration — qrw 0.7 — steps 16

Guidelines:

  • You can reduce QR code density by using a URL shortener.
  • QR Weight ( — qrw): The default value for this parameter is 0.8. You can adjust this value between 0 and 2. Adjust the — qrw tuning parameter towards 1 for better readability. Try small increments like 0.05. Higher values will make the QR mode stand out more in the generated output.
  • Balance Steps ( — steps): The default value for this parameter is 16. You can set this value between 10 & 20. Increasing the — steps parameter to 20 will result in improved artistic quality but it can reduce the scannability of the code.
  • Experiment with different settings for QR weight & Balance Steps until you achieve the desired outcome.

These are some QR Art pieces, I generated using QuickQR Art:

Method 3: Make QR Code Art using Stable Diffusion (AUTOMATIC1111 GUI)

Let’s now explore the third technique for crafting QR Art, which involves using stable diffusion in combination with ControlNet.

Stable Diffusion is an open-source AI tool from Stability AI that can generate images from natural text. ControlNet is a neural network structure to control diffusion models by adding extra conditions. It can be installed as an extension for Stable Diffusion.

To use this technique, you will need to download and install Stable Diffusion WebUI repo from AUTOMATIC1111. This web UI can be used on Google Colab, Windows, or Mac platforms. For complete setup instructions you can check the resources mentioned in the video description section. This method allows you to generate exceptional quality QR Code art.

You also don’t need to worry about watermarks or expenses. Once you have completed the local setup, it won’t cost you a dime.

Setup Difficulty Level: Challenging (easy if you are familiar with shell/terminal)

Output: Exceptional Quality QR Art

Restrictions: None! Your technical skills and imagination are the only limits. If you’ve already completed the local setup, it won’t cost you a dime.

1. Setup Stable Diffusion:

Setup Instructions:

  1. Download and install Stable Diffusion WebUI repo from AUTOMATIC1111. This web UI can be used on Google Colab, Windows, or Mac platforms.
  2. Next, get a checkpoint model. In our case, we’ll use GhostMix. Once you have obtained the model, place it in the directory: stable-diffusion-webui -> models -> stable-diffusion
  3. Additionally, download the ControlNet model. ControlNet is a neural network model designed for controlling Stable Diffusion models. You can download this model from the HuggingFace website. In our tutorial, we have downloaded the control_xxx_tile model. Once downloaded, copy the model to the directory: Stable-diffusion-webui -> extensions -> sd-webui-controlnet -> models

Note: For complete setup instructions, check the links in the resources section.

2. Generating QR Code Art:

  1. Run Stable Diffusion web UI. You can run the software by running the following command in the terminal:

cd ~/stable-diffusion-webui;./webui.sh

Open the web browser and click the following URL to start Stable Diffusion.

http://127.0.0.1:7860/

You should see the AUTOMATIC1111 GUI. On the WebUI, you need to perform following steps:

2. Select the checkpoint model. We are using GhostMix.

3. Navigate to the Img2img tab and import the QR code image into the software.

4. Enter the prompt and the negative prompt value.

Sample Prompt:

A 3D bookshelf, detailed art, fine illustration

Negative prompt:

ugly, disfigured, low quality, blurry

5. Upload the QR code to the img2img canvas.

6. Set the parameters for the image-to-image settings. You can adjust the parameters to control the style and complexity of the image.

Here are some recommended values that worked great with my prompts:

Resize mode: Just resize

Sampling method: DPM++2M Karras

Sampling step: 50

Width: 768

Height: 768

CFG Scale: 7

Denoising strength: 0.75

7. Upload the QR code to ControlNet‘s image canvas.

8. Enter the following recommended ControlNet settings. You can play around with the settings to see what works best for your prompt.

Enable: Yes

Control Type: Tile

Preprocessor: tile_resample

Model: control_xxx_tile

Control Weight: 0.87

Starting Control Step: 0.23

Ending Control Step: 0.9

3. Generate the image.

The image generation process will require a few minutes to finish.

Once your AI QR code art is complete, you can use any available QR code reader app on your mobile device to verify the functionality of the QR code image.

Please note that not all images will result in a functional QR code. The success rate is approximately 25%. To increase your chances, make slight adjustments to the parameters and generate more images. Don’t forget to scan them to identify the functional ones.

4. Save the image.

Once you are satisfied with the design, you can save the image and download it.

Guidelines:

To achieve the best outcome, follow these guidelines when creating a QR code:

Denoising strength: The denoising strength is typically set higher than 0.7. If you reduce it too much, you will only see the QR code.

Control Weight: To show the prompt more, decrease the Control Weight.

Starting Control Step: To show the prompt more, increase the Starting Control Step.

Ending Control Step: Decrease the Ending Control Step to stop the ControlNet earlier so that the QR code and the image can blend more naturally.

Here are some QR Art pieces, I generated using Stable Diffusion:

Conclusion:

In today’s digital world, where there’s so much information competing for our attention, it’s super important to find creative ways to stand out and keep people interested. AI QR code art is a fresh and exciting way to blend artistry and functionality. AI QR code art not only enhances the user experience but also opens up new possibilities for creative expression in our digital age. So, let’s embrace this mix of technology and art to create amazing QR codes that people will remember.

Resources:

QuickQRArt (QR Code Generator)

34QR (QR Code Generator)

Hugging Face QR Code Art Generator

How to install and run Stable Diffusion on Apple Silicon M1/M2 Macs

How to install Stable Diffusion on Windows (AUTOMATIC1111)

How to run Stable Diffusion on Google Colab (AUTOMATIC1111)

Download GhostMix

How to Setup ControlNet?

Download ControlNet Models

--

--

Ambreen Khan

Ambreen Khan is a software engineer, a quality evangelist & a passionate learner. Check out her YouTube channel at https://www.youtube.com/@learningexpressway