Introduction and Requirements
Recommended Checkpoints for QR Code Generation
ControlNet Models
ioclab/ioc-controlnetĀ (brightness model)
Style Recommendations - LoRA Models
QR Code Guidelines
As a rule of thumb, the bigger the white margins around the QR, the most readable the QR code will be.
If in your QR code generator an option to set "Error Correction Level" exists, set it as high as possible.
If you like an image but it doesn't scan, you can either:
Keep a fixed seed and lower the Starting Control Step
Keep a fixed seed and introduce small seed variations through the seed "Extra" checkbox
Depending on the workflow you are using, the target resolution massively influences the ease of scan of you QR code. The most flexible resolution is 768x768px. Workflows using the Controlnet QR Pattern (QR Codes) v1.0Ā require 920x920px. So be mindful of finding the right resolution for your workflow.
Using a PNG transparent version of the QR without logo (in some cases) seems to help SD to fill all parts of the image with art.
URL Guidelines
URL Length
The length of the URL itself seem to affect the degree of success of the generation. The shorter the URL the higher the degree of success.
URL Shorteners
tinyurl (search on google)
url.zipĀ (not recommended, they kill URLs quickly)
Make sure to login into the URL shortening you'd like to use, as otherwise your shortened URL will most likely be killed after a set amount of time and your QR will stop working too.
QR Code Generators
QR.io: QR Code Generator | Create QR CodesĀ (with logo insert option!)
https://qrcode.antfu.me/Ā (advanced AI tool with highly customisable shapes)
QR Code and 2D Code Generator - Kerem Erkan
Recommended settings:
Negative Prompt Bonus
Include this in the negative prompt to reduce roundedness in the QR code, which would make it unreadable:Ā
(round, circle:1.2)
QR With Logos
When working with QR with logos, you might want to use an img2img upload mask. In that case, make sure to use an inpaint version of the preferred model. As it yields far better results.
Workflow ā 1Ā control_tile_v11f1e_sd15_tile
AUTOMATIC1111 Tab:
img2img
Recommended Checkpoint:
revAnimated_v121Inp-inpainting.safetensors
Version 1.21 for Inpainting:Ā ReV Animated - v1.2.1-inp | Stable Diffusion Checkpoint | Civitai
revAnimated_v122.safetensors
Version 1.22:Ā www.civitai.com/models/7371/rev-animated
Clip skip:Ā
1
Ā orĀ2
Generate and download QR Code with Logo for your URL:Ā QR.io: QR Code Generator | Create QR Codes
LORA Models:
Prompts: https://pastebin.com/CxmpA2pM
Recommended Checkpoint:Ā Ā revAnimated
Clip skip:Ā
1
Ā orĀ2
Resize Mode:Ā
Just resize
Sampler:Ā
DPM++ 2M Karras
Sampling Steps:Ā
20
Tested Image Resolutions (Start Resolution and Output Target Resolution):Ā
768x768px
Hires. Fix:
Hires. Fix Recommended:Ā
No
CFG Scale:Ā
7
Denoise Strength:Ā
1
ControlNet
Play with ranges depending on checkpoint/image you are generating.
Resize Mode:Ā
Crop and Resize
ControlNetĀ
Unit 0
:Preprocessor:Ā
tile resample
Model:Ā
control vilfle_sd15_tile
Starting Step:
Best results are achieved when starting control step is between 0.23 and 0.33
If the codes can't be scanned, lower the starting control stepĀ š
If the generations look to much like a QR code, increase the starting control step.
Starting Control Step:
Recommended:Ā
0.1
Ending Control Step:
Recommended:Ā
0.45
Control Weight:
Recommended:Ā
1
Control Mode:Ā
Balanced
Workflow ā 2 control_v1p_sd15_brightness
Models for Controlnet:
control_vilfle_sd15_tile [e3b0c442]
control_v1p_sd15_brightness [5f6aabed]
AUTOMATIC1111 Tab:Ā
txt2img
Recommended Checkpoint:Ā Deliberate v2
Clip skip:Ā
2
Image Resolution (Start Resolution and Output Target Resolution)Ā :Ā
768x768px
Ā or512x512px
Resize Mode:Ā
?
SamplerĀ :Ā
DPM++ 2M Karras
Sampling StepsĀ :Ā
15
Hires. Fix:
Hires. Fix Recommended:Ā
No
CFG Scale:
7
ControlNet
Play with ranges depending on checkpoint/image you are generating.
Resize Mode:Ā
Crop and Resize
ControlNetĀ
Unit 0
:Preprocessor:Ā
none
Model:Ā
control vilfle_sd15_tile
Control Weight
Recommended:Ā
0.5
Starting Step:
Recommended:
0.35
Ending Control Step
Recommended:Ā
0.60
Control Mode: Balanced
ControlNetĀ
Unit 1
:Preprocessor:Ā
none
Model:Ā
control_v1p_sd15_brightness [5f6aabed]
Control Weight:
Recommended:Ā
0.35
Recommended Testing Range:
Starting Step
Recommended:Ā
0
Recommended Testing Range:
Ending Control Step
Recommended:Ā
1
Recommended Testing Range:
Control Mode: Balanced
ControlNetĀ
Unit 2
:Preprocessor:Ā
none
Model:Ā
control_v11f1p_sd15_depth [cfd03158]
Weight:
Recommended:Ā
1
Starting Step
Recommended:Ā
0
Ending Control Step
Recommended:Ā
0.2
Control Mode:Ā
Balanced
Workflow ā 3Ā control_tile_v11f1e_sd15_tile
AUTOMATIC1111 Tab:
img2img
Prompt: https://pastebin.com/jwbuuf5X
QR Code model for Controlnet:Ā ioclab/ioc-controlnetĀ (brightness model)
AUTOMATIC1111 Tab:
img2img
Recommended Checkpoint:Ā revAnimated
Clip skip:Ā
2
Tested Image Resolutions (Start Resolution and Output Target Resolution):Ā
512x512px
,Ā768x768px
Ā orĀ1024x1024px
Resize Mode:Ā
Just Resize
Sampler:Ā
DPM++ 2M Karras
Sampling Steps:Ā
15
Hires. Fix:
Hires. Fix Recommended: Only at 512px and below
CFG Scale:Ā
7
Denoise Strength:
0.75
ControlNet
Resize Mode:Ā
Crop and Resize
Play with ranges depending on checkpoint/image you are generating.
ControlNetĀ
Unit 0
:Preprocessor:Ā
none
Model:Ā
control_tile_v11f1e_sd15_tile
Control Weight:Ā
1
Starting Control Step
Recommended:
0.1
Recommended Testing Range:
Ending Control Step
Recommended:
0.45
Recommended Testing Range:
Control Mode:Ā
Balanced
Workflow ā 4Ā monster-labs/control_v1p_sd15_qrcode_monster
QR Code model for Controlnet:Ā DionTimmer/controlnet_qrcode at main
AUTOMATIC1111 Tab:Ā
txt2img
Prompts: https://pastebin.com/sbkge254
Checkpoints for Stable Diffusion:
icbinpICantBelievelts_final.safetensors
ICBINP - "I Can't Believe It's Not Photography" - Final | Stable Diffusion Checkpoint | Civitai
wget https://civitai.com/api/download/models/89464 --content-disposition
icbinp|CantBelievelts_finallnpainting.safetensors
wget https://civitai.com/api/download/models/89658 --content-disposition
Clip skip:Ā
1
Sampler:Ā
DPM++ 2M Karras
Sampling Steps:Ā
27
Resolution Recommended:Ā
1024x1024
Hires. Fix
Hires. Fix Recommended: Only belowĀ
1024x1024
Upscaler:Ā
Latent
Denoising Strength:Ā
1
Upscale by:Ā Ā
2
Hires steps:Ā
0
/13
CFG Scale:Ā
7
ControlNet:
Play with ranges depending on checkpoint/image you are generating.
Resize Mode:Ā
Crop and Resize
ControlNetĀ
Unit 0
:Preprocessor:Ā
invert (from white bg & black line)
Model:Ā
control_v1p_sa15_qrcode_monster
Control Weight:
Recommended:Ā
1.25
Recommended Testing Range:Ā
1-2
Starting Control Step:
Recommended:Ā
0
Recommended Testing Range:Ā
0-0.2
Ending Control Step:
Recommended:Ā
0.75
Recommended Testing Range:Ā
0.70 - 0.9
Control Mode:Ā
Balanced
Workflow ā 5 control_v1p_sd15_brightness
First off - We need a QR Code - I highly recommend this website, as it allows you to change the "fault tolerance" to 30%. This is going to allow us further diffusing all while still having a code that scans. Keep in mind, the shorter the URL, the less complex the pattern will be, making diffusing easier.
Next we will be focusing on the txt2img tab with the "Rev\_Animated" - then - adding in your prompts.
Once our prompt is set, follow the settings below.
Lastly, we move onto ControlNet. We will be uploading the picture of our QR Code into ControlNet unit 0 & ControlNet unit 1. The settings are as follows.
These settings should get most prompts a working QR Code. However, if you find your specific image is not scanning you will need to adjust the following settings until it properly scans.
1. Control weight on both ControlNet units.
2. Starting control step on both ControlNet units
3. Ending control step on both ControlNet units
These will allow you to fine tune your image to get the desired result + a working QR Code.
I genuinely hope that this guide has offered a comprehensible and enlightening glimpse into QR Code Workflows. If there are any queries you'd like to raise, or if you have any additional tips that could enrich this guide even further, I encourage you to post them in the comments. Your contributions are valuable and can help in refining and expanding this guide, as well as benefiting others who discover it. I appreciate your engagement and support ā thank you!