top of page

latest stuff in ai, directly in your inbox. 🤗

Thanks for submitting!

Writer's pictureYash Thakker

Creative QR Codes with AI and ControlNet

Updated: Jul 4, 2023

QR codes have become an everyday convenience, providing a seamless way of sharing information or connecting people to online content. Recently, they've emerged as a new canvas for art, courtesy of Stable Diffusion. Let's explore how you can transform ordinary QR codes into intriguing works of art.


Video Guide:




Step 1: Generating a Basic QR Code


First things first, you need a QR code to work with. There are many online tools available for this, like this one: https://keremerkan.net/qr-code-and-2d-code-generator/. Here you can generate a QR code for free.




Simply enter your URL (using a URL shortener can be helpful), and make sure to set the error correction level to high. This adjustment is necessary because we'll be integrating this QR code with our chosen image in the subsequent steps. Once done, generate the QR code and save it to your computer.


Step 2: Crafting Art to Blend with the QR Code


With your QR code ready, it's time to select an image that you'd like to blend with it. You can use an image you've previously created, or you can generate a new one using the 'txt2Img' tab within Stable Diffusion.




To generate an image within Stable Diffusion, follow these steps:

  1. Select the model as 'revAnimated_v122'.

  2. Choose 'DPM++ 2S a Karras' as the sampling method.

  3. Set the sampling steps to 20.

  4. Set the resolution to 768 x 768.

  5. Set the CFG scale to 11.



After you've set these parameters, generate your image.


Step 3: Fusing the Art and the QR Code


With your QR code and artistic image ready, it's time to merge them into a unified artistic QR code. To do this, we'll utilize the 'img2img' tab within Stable Diffusion. You can either use the image you've just created, or upload a different image if you prefer. Remember, you have to enter positive and negative prompts within the 'img2img' tab for this process to work.

Set your parameters as follows:

  1. Select 'DPM++ 2S a Karras' as the sampling method.

  2. Set the sampling steps to 60.

  3. Set the resolution to 768 x 768.

  4. Set the CFG Scale to 11.

  5. Choose a Denoising strength of 1.0.

Once your settings are in place, it's time for ControlNet to step in and work its magic!

Within 'ControlNet Unit 0', upload your image again—the one that was generated in the 'txt2img' tab or your own image if you chose to use a different one.

Set the parameters in 'ControlNet Unit 0' as follows:

  1. Enable ControlNet.

  2. Select 'OpenPose' as the Control Type, 'openpose_full' as the pre-processor, and 'control_sd15_openpose' as the ControlNet model.

  3. Keep the Control Weight at 1. We'll be instructing ControlNet to give greater weight to our QR code shortly.

  4. Leave the Starting Control Step at 0 and the Ending Control Step at 1. We want our image to be generated right from the start.

  5. Select 'Balanced' as the Control Mode.

  6. Choose 'Resize and Fill' for the Resize Mode.



Next, navigate to 'controlNet Unit 1'. If you don't see this option, go to 'Settings' > 'ControlNet' and adjust the slider to display more than one ControlNet tab.

Upload your QR code to the 'ControlNet Unit1' tab and adjust the settings as follows:

  1. Enable ControlNet.

  2. Choose 'tile' as the Control Type.

  3. Select 'tile_resample' as the pre-processor.

  4. Select 'control_v11f1e_sd15_tile' as the ControlNet model (your version of the ControlNet tile model may be different).

  5. Set the Control Weight to 1.2. This tells ControlNet that our QR code should be slightly more prominent than our image.

  6. Set the Starting Control Step to 0.23 and the Ending Control Step to 1. This ensures that our image begins rendering before the QR code is applied, which results in a more pleasing visual effect.

  7. Choose 'Balanced' as the Control Mode.

  8. Select 'Resize and Fill' for the Resize Mode.



And voila! You have now successfully transformed your regular QR code into an aesthetically pleasing, artistic QR code that is bound to capture attention and intrigue. Enjoy the process and experiment with various images to create your unique QR codes.




2,045 views0 comments

Comments


TOP AI TOOLS

snapy.ai

Snapy allows you to edit your videos with the power of ai. Save at least 30 minutes of editing time for a typical 5-10 minute long video.

- Trim silent parts of your videos
- Make your content more interesting for your audience
- Focus on making more quality content, we will take care of the editing

Landing AI

A platform to create and deploy custom computer vision projects.

SupaRes

An image enhancement platform.

MemeMorph

A tool for face-morphing and memes.

SuperAGI

SuperAGI is an open-source platform providing infrastructure to build autonomous AI agents.

FitForge

A tool to create personalized fitness plans.

FGenEds

A tool to summarize lectures and educational materials.

Shortwave

A platform for emails productivity.

Publer

An all-in-one social media management tool.

Typeface

A tool to generate personalized content.

Addy AI

A Google Chrome Exntesion as an email assistant.

Notability

A telegrambot to organize notes in Notion.

bottom of page