okuha-logo-small-white

Create An Artistic QR Code With Stable Diffusion

qr-code-with-stable-diffusion-feature-image-v2

If you click on a link and make a purchase, I may receive a small commission. As an Amazon affiliate partner, I may earn from qualifying purchases.
Read our disclosure.

Step 1. Download the Needed Software And WebUI

To run Stable Diffusion and modify the QR code, you need the following files:

automatic1111-controlnet-extension-installation
You need the ControlNet extension for the QR code modification.

Check out: Beginners guide to AUTOMATIC1111 WebUI

Step 2. Generate The QR Code

To generate a free QR code, visit 34qr.com. I selected a URL-based QR code.

generate-URL-qr-code
You can select different QR code templates from 34qr.

Settings for the QR code:

  • Size: 512 x 512px
  • Encoding: UTF-8
  • Fault tolerance: H(30%)
  • QR Code Color: #000000
  • Background Color: #FFFFFF
okuha-qr-code
QR code pointing to https://okuha.com website.

When all settings are done, hit the Generate button and download the QR code as a PNG file.

Step 3. Create Artistic QR Code With Stable Diffusion

automatic1111-img2img-tab-configuration-for-qr-code-modification
Img2img (image-to-image) tab has the usual text prompt (1.) and the negative text prompt (2.). In img2img, you can upload the QR code PNG file.

Initial steps:

Image-to-image settings:

  • Resize mode: Just resize
  • Sampling method: DPM++2M Karras
  • Sampling steps: 25
  • Width: 512
  • Height: 512
  • Batch size: 4
  • CFG Scale: 7
  • Denoising strength: 0,64 (lower value increases the QR code implementation to the AI art)

ControlNet (v1.1.224) settings (scroll down the browser screen to find ControlNet settings):

  • Enable: checked
  • Control Type: Tile
  • Preprocessor: tile_resample
  • Model: control_v11f1e_sd15_tile
  • Control Weight: 0,7
  • Starting Control Step: 0,2
  • Ending Control Step: 0,64
  • Control mode: ControlNet is more important
  • Resize mode: Just resize

When all settings are done, press Generate at the top of the WebUI. You can find the generated images in this folder: *\stable-diffusion-webui\outputs\img2img-images

qr-code-stable-diffusion-okuha-results
okuha-qr-code
Original QR Code.
qr-code-stable-diffusion-okuha
Stable Diffusion modified QR code.

Normal text prompt used in the example:

1 girl, mechanical, cyborg, kimono, 1 face, portrait, highly detailed, sharp, ultra-detailed, front view

Negative text prompt used in the example:

blurry, nsfw, easynegative, bad quality, ugly, disfigured, low quality, low-res

Additional Tips for AI ART QR Code Generation

  • Long QR code text can make the QR code too complex for it to work with AI art blended into it.
  • Adjust the following parameters to make the QR code visible with the AI art:
    • Image-to-image Denoising strength: Lower values bring the QR code image more visible.
    • ControlNet Control Weight: Higher values emphasize the ControlNet rather than the text prompt.
    • ControlNet Starting Control Step: Higher values show the effects of the text prompt more.
    • ControlNet Ending Control Step: Lower values make the ControlNet stop earlier and make the QR code blend better with the generated artwork.
  • Some checkpoint models don’t work well with blending QR codes with AI art. Try out different ones until you find one that works well with QR codes.
  • Depending on the parameters, only a few images from a batch of ten can be scanned successfully.
  • You might need to tweak the above parameters a lot before you find a good combination between the parameters and the checkpoint model.
  • Start the image generation testing with a batch size of 1 or 4 before doing bigger batches.
Search
artist-profile-picture-avatar

Okuha

Digital Artist

I’m a digital artist who is passionate about anime and manga art. My true artist journey pretty much started with CTRL+Z. When I experienced that and the limitless color choices and the number of tools I could use with art software, I was sold. Drawing digital anime art is the thing that makes me happy among eating cheeseburgers in between veggie meals.

More Posts

11 Best Anime Stable Diffusion Models for Anime Art Generation

8 Best AI Anime Art Generators – Next-Level Anime Art Generation

My Honest PixAI Review – Pricing, Features, Use Cases

How to Use AUTOMATIC1111 WebUI – Full Beginners Guide

AI Art Models – Everything You Need to Know (Incl. SD Models)

How to Use Stable Diffusion For AI Art Generation – Beginners Guide to AI Art

Contact and Feedback

Thank You!

Thank you for visiting the page! If you want to build your next creative product business, I suggest you check out Kittl!