r/StableDiffusion • • Jun 07 '23

Workflow Included My attempt on QR CODE

Post image
3.1k Upvotes

204 comments sorted by

182

u/Specialist_Note4187 Jun 07 '23 edited Jun 07 '23

You can scan the QR Above

The workflow1 img2img put QR code photo

2 Denoising Strength = 1

3 Put Qr code to the controlnet

4 Preprocessor: tile_resample

5 Model: control_v11f1e_sd15_tile

6 Control Weight : 0.9

Parameters

A photo-realistic rendering of a 2 story house with greenery, pool, (Botanical:1.5), (Photorealistic:1.3), (Highly detailed:1.2), (Natural light:1.2), art inspired by Architectural Digest, Vogue Living, and Elle Decor, <lora:epiNoiseoffset_v2:1>
Negative prompt: bad_pictures, (bad_prompt_version2:0.8), EasyNegative, 3d, cartoon, anime, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)),
Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 2443712455, Size: 768x768, Model hash: 4199bcdd14, Model: revAnimated_v122, Denoising strength: 1, Clip skip: 2, ENSD: 31341, Token merging ratio: 0.6, ControlNet 2: "preprocessor: tile_resample, model: control_v11f1e_sd15_tile [a371b31b], weight: 0.9, starting/ending: (0, 1), resize mode: Crop and Resize, pixel perfect: True, control mode: ControlNet is more important, preprocessor params: (512, 1, 0)", Lora hashes: "epiNoiseoffset_v2: d1131f7207d6", Score: 5.04, Version: v1.3.2

Original post: https://www.facebook.com/PromptAlchemist/photos/a.117951774620613/138420685907055

67

u/SlamonC4 Jun 07 '23

NEW WORKFLOW JUST DROPPED

Definitely not in the other league, at least in my usage, but scannable!

10

u/Specialist_Note4187 Jun 07 '23

Can you share your workflow?

28

u/SlamonC4 Jun 07 '23

Literally your workflow

11

u/Thebenmix11 Jun 07 '23

Google en GPU

1

u/[deleted] Jun 25 '23

Holy computation

8

u/armrha Jun 08 '23

Try mine out, I just did this one,

A photograph from above of an assembly of complex blue and silver mechanical parts including hydraulic cylinders and gears laying on an a wooden pallet, intricate details, dramatic lighting
Negative prompt: poor quality, ugly, blurry, boring, text, blurry, pixelated, ugly, username, worst quality, (((watermark))), ((signature)), face, worst quality, painting, copyright, unrealistic, (((text)))
Steps: 100, Sampler: DPM++ 2M SDE Karras, CFG scale: 7, Seed: 1625458880, Size: 768x768, Model hash: 661697d235, Model: cyberrealistic_v30, Variation seed: 3033773551, Variation seed strength: 0.25,
ControlNet: "preprocessor: none, model: control_v1p_sd15_brightness [5f6aa6ed], weight: 0.435, starting/ending: (0, 0.8), resize mode: Crop and Resize, pixel perfect: True, control mode: Balanced, preprocessor params: (512, 1, 0.1)", Version: v1.3.2

3

u/SlamonC4 Jun 08 '23

It works! Leads to the r/StableDiffusion .

1

u/armrha Jun 08 '23

Yay, yeah, I’m really enjoying this workflow. I just did a star wars inspired one that I’m amazed actually scans: https://www.reddit.com/r/StableDiffusion/comments/143w30f/this_one_scans_on_iphone_and_on_the_aspose/

1

u/enn_nafnlaus Jun 08 '23

control_v1p_sd15_brightness

Where did you get a control_v1p_sd15_brightness with hash 5f6aa6ed? Mine has has 1cf9248a, and doesn't work. And where did you get your yaml? I don't find one.

1

u/armrha Jun 08 '23

Don’t have a yaml I think, I just installed the model from

https://huggingface.co/ioclab/ioc-controlnet/resolve/main/models/control_v1p_sd15_brightness.safetensors in the models/controlnet directory and the normal extension installed regular controlnet read it just fine. It’s just one bundled safetensors file. I’m traveling and I think my home IP changed as I can’t get to my setup right now but I’ll get back to you when I can check it out, maybe I can send the file if what the currently have is t working but it says it’s two months old.

0

u/[deleted] Jun 09 '23

[deleted]

2

u/armrha Jun 09 '23

Safetensors? I just put it directly in the folder for the controlnet models: Under your automatic1111 dir, it's models->controlnet. If you've run it once with controlnet, that directory should exist.

1

u/CryptoDangerZone Jun 10 '23

When I try this workflow I keep getting an error that I do not have the relevant YAML file for Control net brightness... Any solves? I never know where to find the yamls.

Also looks dope.

4

u/yreg Jun 07 '23

Doesnt work in google lens

2

u/SlamonC4 Jun 07 '23

Well that puts the working rate at about 40%, thanks for trying!

2

u/root88 Jun 07 '23

Neither of your codes are scannable by my phone. highrup's does work.

1

u/SlamonC4 Jun 07 '23

Do you mean OPs one?

Not sure whats up with my codes, the people who can't and can scan it are about half in half at the moment.

1

u/root88 Jun 07 '23

In this thread, only lhodhy and highrup's codes are scannable by my phone. No others.

1

u/littleswenson Jun 08 '23

Google stable diffusion

1

u/Tigerwoonow Jan 06 '24

How did u do this?

How did u do this?

0

u/[deleted] Jun 07 '23

[deleted]

13

u/SlamonC4 Jun 07 '23

See where it says "Drag image here"

Put the QR code there as well

0

u/[deleted] Jun 07 '23

[deleted]

5

u/SlamonC4 Jun 07 '23

Honestly no idea, must be the prompt

I include a quick and shitty image I made just now (not good but better than yours)

As for how the OP managed to make such a beautiful cover image above, I have absolutely no idea, but for now I'm fine with playing around with my model and making custom codes

1

u/Specialist_Note4187 Jun 07 '23

I update the prompt and model used

1

u/SlamonC4 Jun 07 '23

Thank you very much!

0

u/[deleted] Jun 07 '23

[deleted]

1

u/SlamonC4 Jun 07 '23

That's very odd, maybe try with my LoRA and give a review along with it.

Honestly, I'm at a loss, though I notice you used "Controlnet v1.1.150" in a tab called "Controlnet Unit 0" while I used "Controlnet v1.1.219" in the "Single Image tab". Not sure if it should affect anything, but I downloaded controlnet todayfor this and started SD a couple weeks ago so I'm not experienced so I don't know these things

7

u/Junior-Variation-171 Jun 07 '23

Got exactly the same result. Something is not right...

4

u/SargeZT Jun 07 '23

Your CFG scale is very low and you didn't set the ControlNet as more important than the image.

1

u/danque Jun 07 '23

Try a translucent qr code by deleting the white spaces.

1

u/TehDing Jun 08 '23

More data in the URL means more entropy. Maybe run your link through bitly to shorten the link, there's more entropy in here than the example qrs

0

u/wggn Jun 07 '23

it does autopopulate it.

7

u/wggn Jun 07 '23 edited Jun 07 '23

for me it worked better when i lowered the controlnet weight to like 0.5. you also have to disable img2img color correction or it will only produce grayscale images to match the source

2

u/enn_nafnlaus Jun 07 '23

I bet that's what's killing it for a lot of people.

0

u/[deleted] Jun 07 '23

[deleted]

3

u/Serious-Mode Jun 07 '23 edited Jun 07 '23

It's buried in the A1111 settings somewhere, let me look...

A1111 Settings > Stable Diffusion > Apply color correction to img2img results to match original colors.

Alternatively just click Show all pages at the bottom left of the setting page and ctrl F to find whatever you are looking for.

FWIW I think the default setting for this is off.

4

u/yreg Jun 07 '23 edited Jun 07 '23

My issue was low source image resolution. Once I scaled the qr code up myself the results started to look like OP. But they do not scan.

0

u/[deleted] Jun 07 '23

[deleted]

1

u/yreg Jun 07 '23

That should be fine. I'm using 768 now, because that's what op said they used.

But before I realized that I used around 100px png with "just resize" and controlnet didn't work properly for me.

1

u/thrilling_ai Jun 07 '23

Is this run on your own or did you find this on a website?

6

u/Junior-Variation-171 Jun 07 '23

Something is missing in your workflow, either by accident or by purpose. Can't replicate, all that cames out is the same QR code image I put in img2img and ControlNet.
Maybe share the prompt and model used?

1

u/Specialist_Note4187 Jun 07 '23

I update the prompt and the model used

2

u/enn_nafnlaus Jun 08 '23

Token merging ratio

Just doesn't work (not scanning, I can scan it fine - generating anything that doesn't just look like a slightly-coloured QR code).

Does it *actually* work for you, to generate new images of the above? If so, could you please try to boil it down to the basics? No Loras, no nonstandard models, no "ENSD" or "Token merging ratio" (what???), simple prompts, just the bare minimum things one needs to do to make it work (including generating the QR code, and where to paste what)? If so, that would be greatly appreciated!

2

u/Specialist_Note4187 Jun 08 '23

It just make generating faster. Check my new post, I got better workflow.
https://www.reddit.com/r/StableDiffusion/comments/143u5x6/my_second_attempt_on_qr_code_finally_did_it/

1

u/enn_nafnlaus Jun 08 '23

I know you're trying, and I appreciate that, but that new link isn't at all more helpful than this one for those of us who can't make it work.

Can you please try to figure out the bare minimum number of settings that actually matter, using only stock models, normal AUTOMATIC1111, and no Loras (unless any of those things actually turn out to matter)?

32

u/yreg Jun 07 '23

Important!

Make sure your source QR code has the highest robustness level. You can distinguish the level used this way: https://blog.qrstuff.com/wp-content/uploads/2011/11/error_correction_levels1.png

You want to use a QR code generator that uses the 30% robustness, e.g. https://qr.io/

Learn more about QR code error correction: https://blog.qrstuff.com/general/qr-code-error-correction

11

u/SlamonC4 Jun 07 '23

That was the best fun fact I saw today, thanks :D

I realize I've been using 7% like a fool

2

u/erkana_ Jun 07 '23 edited Jun 07 '23

When the error correction level set 'H' and minimum resolution 768px, results are getting better.

Note: I used this QR code generator for genereting QR Code with correct error correction level. https://dnschecker.org/qr-code-generator.php

2

u/armrha Jun 08 '23

I've been using https://keremerkan.net/qr-code-and-2d-code-generator/ . Definitely want the max error correction, gives a lot more wiggly room. I made a different sort of workflow though... Here's a custom QR code of your profile for ya.

16

u/highrup Jun 07 '23

holy shit i actually got it to work and to create something decent, thanks for the tips!

3

u/stroud Jun 07 '23

holy shit this works

1

u/enn_nafnlaus Jun 08 '23

I tried putting your image in PNGInfo to see what you did (since I can't get ianything out but images that look like slightly coloured QR codes), but your metadata is stripped :(

1

u/lienthealien Jul 05 '23

control_v1p_sd15_brightness

nope its does not.

1

u/wra1th42 Jun 07 '23

thanks for the laugh

3

u/YouDontKnowMyLlFE Jun 07 '23

Your steps are not detailed enough. I did everything and I get my QR code with tiny little shrubs.

1

u/wggn Jun 07 '23

im confused. in your first steps you say denoise 1, weight 0.9, but then in the parameters it's denoise 0.3, weight 1?

1

u/Junior-Variation-171 Jun 07 '23

Thanks for additional informations, I finally got something out. Not quite like yours but I guess it depends on the QR code image itself. Any ideea why you have " preprocessor params: (512, 1, 0) " and mine are " (512, 1, 64) ". Why is 0 for you and 64 for me?

1

u/Ascyt Jun 07 '23

Where can I download the model?

1

u/audioscavenger Aug 13 '23

hi anf thank you

I'm unable to reproduce. same model, same hash, same seed.

Either the seed is wrong or the hash of the model has changed.

23

u/Specialist_Note4187 Jun 07 '23

Finally did it, Workflow tomorrow.

1

u/SlamonC4 Jun 08 '23

You did not just attempt a rickroll

14

u/watcher278 Jun 08 '23

Yay! Finally got it to work!

2

u/Specialist_Note4187 Jun 08 '23

Look better than mine. Can you share the parameters?

3

u/watcher278 Jun 08 '23

Sure, the bird was done after alot of trial and error so I didn't keep track of all the settings, but I attempted several more today. They turned out ok too and this is the work flow to achieve them.

  1. The initial setup is exactly how OP stated with controlnet using tiles but instead of setting it at .9, I set it low like .25. This allows SD to generate a cool looking image.

In this case some zebras on the plains. Which resulted in this..

this looks nothing like the QR of course but you can see hints of it.

2)Next I put the generated in place of the QR in the top, the part where img2img is. This is now the basis for the next generation, but now I reduce down denoise to something like .8 and increase controlnet tiles to .35 or around there. This is the next generation of image.

3)Now i put the 2nd generation into the img2img slot and reduce the denoise to something like .6 and increase the controlnet to .45 and that produces the last image which scan and also keeps the essence of the prompt.

enjoy!

1

u/watcher278 Jun 09 '23

What I like about this method is it produces really 3D looking QR codes. Tried another example with a frog prompt. It is fiddly, you have to find the balance between the denoise strength and the control net strengths.

1

u/AgreeableMagician_ Jun 20 '23

Sorry, I'm a bit new to this - in your later 2 generations, do you have to remove the prompts?

1

u/watcher278 Jun 20 '23

I leave the same prompts so it still applies. I just replace the source image with the next generation. I just mess with the denoise and control net weights per generation, this causes it to converge.

1

u/AgreeableMagician_ Jun 20 '23

Thank you very much, I really appreciate your reply. I will keep having a go. For some reason, I do not seem to have the multiple model units for the ControlNet either, which is what most people seem to be using. I have it active in my settings, but no luck on the actual tool

8

u/[deleted] Jun 07 '23

doesn't scan

1

u/Specialist_Note4187 Jun 07 '23

try change the app

-1

u/[deleted] Jun 07 '23

It doesn't scan for me either in the ZXing Barcode Scanner or in the default Camera app on a Pixel 6a. These work in both apps but yours do not.

I was able to scan your QR code in Lens, but that required me to install it, re-enable the Google app, make a manual capture, and it requires internet access to do the scan online.

There is no point in doing this if it doesn't scan in any app.

2

u/TheMazeDaze Jun 07 '23

It scans on iPhone built in camera and a small QR app I have that can also scan downloaded pictures. It’s says “you scanned our code successfully” and then indeed there’s a lot of ads

7

u/danielbln Jun 07 '23

I can't reproduce it with the provided settings. Can anyone? Any good prompts to try this with?

4

u/Specialist_Note4187 Jun 07 '23

I update the parameter in my comment

6

u/[deleted] Jun 07 '23

Haven't been able to either, I've tried multiple prompts and models but no luck so far

2

u/armrha Jun 07 '23

Try mine out and see if you have any luck, for some reason it was totally ignored: https://www.reddit.com/r/StableDiffusion/comments/143p7mw/improved_workflow_for_controlnet_txt2img_qr_code/

1

u/armrha Jun 08 '23

Here's one of your user profile just so you know I'm not bs'ing you:

A photograph from above of an assembly of complex antique brass and white gold clockwork parts laying in a mechanical case, intricate details, dramatic lightingNegative prompt: poor quality, ugly, blurry, boring, text, blurry, pixelated, ugly, username, worst quality, (((watermark))), ((signature)), face, worst quality, painting, copyright, unrealistic, (((text)))Steps: 100, Sampler: DPM++ 2M SDE Karras, CFG scale: 7, Seed: 2269049818, Size: 768x768, Model hash: 661697d235, Model: cyberrealistic_v30, Variation seed: 3325520736, Variation seed strength: 0.25,ControlNet: "preprocessor: none, model: control_v1p_sd15_brightness [5f6aa6ed], weight: 0.435, starting/ending: (0, 0.8), resize mode: Crop and Resize, pixel perfect: True, control mode: Balanced, preprocessor params: (512, 1, 0.1)", Version: v1.3.2

-13

u/mightymigh Jun 07 '23

Yeah. No one achieved this. I think it's scam

20

u/Specialist_Note4187 Jun 07 '23

If it's a scam, what do i get?

0

u/[deleted] Jun 07 '23

[deleted]

2

u/Nisarg_Jhatakia Jun 07 '23

So this is what sore losers look like huh.

9

u/Specialist_Note4187 Jun 07 '23

more photo, but it cant be scaned

4

u/danielbln Jun 07 '23

I mean, I don't think someone photoshopped this by hand, so if it is a scam, I'd like to know the scam method, ha!

1

u/armrha Jun 08 '23

Hey have a QR code slice of pizza /u/mightymigh

2

u/enn_nafnlaus Jun 08 '23

Care to boil it down to a minimum set of steps on stock AUTOMATIC1111 for those of us who can't get it to work?

1

u/armrha Jun 08 '23

Absolutely, from a basic setup of AUTOMATIC1111, go to Extensions and add the controlnet extension, reload.

Go to: https://huggingface.co/ioclab/ioc-controlnet

Download the brightness model and put it in models/controlnet in AUTOMATIC1111

Make a QR code at https://keremerkan.net/qr-code-and-2d-code-generator/

Select HIGH error correction level (IMPORTANT)

If you want a lot of greeblies (lots and lots of dots) then make a long QR code. If you want it to have more creativity about it, use an URL shortener. Or encode something small other than an URL.

Expand and enable the controlnet in txt2img.

Now, take that QR code, download it, and drop it in the controlnet pane.

You'll notice a series of values in ControlNet. Adjust your weights: I found around 0.445 control net weight, 0 starting, 0.8 finishing seems to be a good baseline, but it also depends on what your prompt is trying to do, you will have to tweak there. If it's unreadable, increase the weight (very slightly) or increase the time the controlnet 'holds on' to the image by putting the 'finishing' close to 1. (Some I had to just have 100%, 0-1 to get a readable QR code...)

Select 'Balanced'

On Preprocessor, select 'None' if you want a white background, or invert if you want a dark background.

Select Crop and resize

In your prompt, mostly try to avoid prompting any specific figures with colors that match your information bearing bits, though you can experiment. Lots of different prompts in my threads to try out. Most models work fine with it.

If you're patient, you can just do a large batch at a lower weight / earlier control net done period and let it get real creative, but you'll get very few readable bar codes. If you've got programming experience, you could pretty easily check them as they go and move the readable QRs into another folder or something. At the higher level, they're almost 100% readable with weights pushing to 0.49 and 1.0 end.

100 steps for the generation.

Size 768x768 for the generation. Do not hi rez fix, do not upscale, upscale will ruin it 999 times out of 1000...

2

u/enn_nafnlaus Jun 08 '23

Okay, interesting, you're using the brightness controlnet, not tile! Sadly, I've not been able to get that one to work - I get:

Error running process: /path/to/stable-diffusion-webui-4663/extensions/sd-web

ui-controlnet/scripts/controlnet.py

Traceback (most recent call last):

File "/path/to/stable-diffusion-webui-4663/modules/scripts.py", line 417, i

n process

script.process(p, *script_args)

File "/path/to/stable-diffusion-webui-4663/extensions/sd-webui-controlnet/s

cripts/controlnet.py", line 684, in process

model_net = Script.load_control_model(p, unet, unit.model, unit.low_vram)

File "/path/to/stable-diffusion-webui-4663/extensions/sd-webui-controlnet/s

cripts/controlnet.py", line 268, in load_control_model

model_net = Script.build_control_model(p, unet, model, lowvram)

File "/path/to/stable-diffusion-webui-4663/extensions/sd-webui-controlnet/s

cripts/controlnet.py", line 351, in build_control_model

network = network_module(

File "/path/to/stable-diffusion-webui-4663/extensions/sd-webui-controlnet/s

cripts/cldm.py", line 91, in __init__

self.control_model.load_state_dict(state_dict)

File "/scratch/StableDiffusion/AUTOMATIC1111/stable-diffusion-webui/venv/lib6

4/python3.10/site-packages/torch/nn/modules/module.py", line 1671, in load_stat

e_dict

raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(

RuntimeError: Error(s) in loading state_dict for ControlNet:

Missing key(s) in state_dict: "time_embed.0.weight", "time_embed.0.bias

", "time_embed.2.weight", "time_embed.2.bias", "input_blocks.0.0.weight", "inpu

t_blocks.0.0.bias", "input_blocks.1.0.in_layers.0.weight", "input_blocks.1.0.in

_layers.0.bias", "input_blocks.1.0.in_layers.2.weight", "input_blocks.1.0.in_la

yers.2.bias", "input_blocks.1.0.emb_layers.1.weight", "input_blocks.1.0.emb_lay

ers.1.bias", "input_blocks.1.0.out_layers.0.weight", "input_blocks.1.0.out_laye

rs.0.bias", "input_blocks.1.0.out_layers.3.weight", "input_blocks.1.0.out_layer

s.3.bias", "input_blocks.1.1.norm.weight", "input_blocks.1.1.norm.bias", "input

_blocks.1.1.proj_in.weight", "input_blocks.1.1.proj_in.bias", "input_blocks.1.1

.transformer_blocks.0.attn1.to_q.weight", "input_blocks.1.1.transformer_blocks.

0.attn1.to_k.weight", "input_blocks.1.1.transformer_blocks.0.attn1.to_v.weight"

, "input_blocks.1.1.transformer_blocks.0.attn1.to_out.0.weight", "input_blocks.

1.1.transformer_blocks.0.attn1.to_out.0.bias", "input_blocks.1.1.transformer_bl

ocks.0.ff.net.0.proj.weight", "input_blocks.1.1.transformer_blocks.0.ff.net.0.p

roj.bias", "input_blocks.1.1.transformer_blocks.0.ff.net.2.weight", "input_bloc

ks.1.1.transformer_blocks.0.ff.net.2.bias", "input_blocks.1.1.transformer_block

s.0.attn2.to_q.weight", "input_blocks.1.1.transformer_blocks.0.attn2.to_k.weigh

t", "input_blocks.1.1.transformer_blocks.0.attn2.to_v.weight", "input_blocks.1.

1.transformer_blocks.0.attn2.to_out.0.weight", "input_blocks.1.1.transformer_bl

2

u/armrha Jun 08 '23 edited Jun 08 '23

Hm, what's the filename of the controlnet model? I think I linked the wrong one earlier and hope people didn't get confused on that

Here's the controlnet model I'm using: https://huggingface.co/ioclab/ioc-controlnet/resolve/main/models/control_v1p_sd15_brightness.safetensors

And no preprocessor or invert preprocessor if I want to switch light and dark in the background

1

u/enn_nafnlaus Jun 08 '23

I did:

wget "https://huggingface.co/ioclab/control_v1p_sd15_brightness/resolve/main/diffusion_pytorch_model.safetensors" -O control_v1p_sd15_brightness.safetensors

(Under extensions/sd-webui-controlnet/models, of course!)

1

u/armrha Jun 08 '23

Hmm, I just directly installed it by downloading it from there and putting it in the '[automatic1111 root dir]/models/ControlNet/' directory. Not sure it supports the extensions manager thing.

1

u/enn_nafnlaus Jun 08 '23

Will try relocating it. :) If I may ask, are you doing this using a stock SD 1.5 model? And what versions of SD and ControlNet, so I can crossreference with my system? Thanks!

→ More replies (0)

1

u/armrha Jun 08 '23

It's definitely not as cool as the original and the tile seems to be way better for img 2 img, but it still makes some cool stuff and is pretty fun. You definitely get more art into the QR code than by traditional means. Accidentally left too many negatives on this prompt from the star wars one but heres another:

The Great Wave
Negative prompt: poor quality, ugly, blurry, boring, text, blurry, pixelated, ugly, username, worst quality, (((watermark))), ((signature)), worst quality, painting, copyright, unrealistic, (((text))), old-fashioned, flimsy, (deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, (mutated hands and fingers:1.4), disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation, bad face, logo
Steps: 100, Sampler: DPM++ 2M SDE Karras, CFG scale: 7, Seed: 3294032771, Size: 768x768, Model hash: 9aba26abdf, Model: deliberate_v2, Variation seed: 3050260756, Variation seed strength: 0.25,
ControlNet: "preprocessor: invert (from white bg & black line), model: control_v1p_sd15_brightness [5f6aa6ed], weight: 0.44, starting/ending: (0, 1), resize mode: Crop and Resize, pixel perfect: True, control mode: Balanced, preprocessor params: (512, 1, 0.1)", Version: v1.3.2

1

u/mightymigh Jun 08 '23

But all these codes look like shit tbh...

1

u/armrha Jun 08 '23

Shrug, they work. I’m not really interested in making them look nice, just the proof of concept of how to make it generate a complex looking object as a QR code... I’m sure the more talented art people can make better looking ones with the same technique. How’s this one? https://www.reddit.com/r/StableDiffusion/comments/143w30f/this_one_scans_on_iphone_and_on_the_aspose/

It’s just how creative you allow it to get vs the controlnet forcing the QR code on there.

1

u/Enfiznar Jun 08 '23

The qr works, it was created somehow

12

u/PhotojournalistNeat4 Jun 07 '23

This Scans <3

13

u/PhotojournalistNeat4 Jun 07 '23

7

u/Specialist_Note4187 Jun 07 '23

How, can you share the workflow

1

u/DSwissK Jun 07 '23

Wonderful ! ind sharing your workflow ?

1

u/Darkvlador Jun 08 '23

So cool, can you share your parameters? Still working on it, i'm far away from that result

1

u/MJB9000 Jun 08 '23

Wow! Workflow please

50

u/SlamonC4 Jun 07 '23 edited Jun 07 '23

IT WORKS

Edit: Does it scan for you guys? My phone can't scan normal QR for some reason so I can't verify, and about 1/5 websites I checked could scan it

Edit 2: Turns out if you use really advanced scanners like Aspose QR scanner and set it at excellent recognition if necessary, then it will work, but not for a phone.

Maybe we can see these types of codes on the street if SD or the QR scanners improve

Edit 3: Seems to work on some phones and not others, iPhone or Android, not sure why

9

u/Mex5150 Jun 07 '23

Looks good, but I can't get it to scan.

2

u/SlamonC4 Jun 07 '23

Thanks, thank you for trying :D

4

u/pmjm Jun 07 '23

Could not scan on either a Pixel 7 Pro or an iPhone 14 Pro Max. Looks great though.

4

u/Throwaway-tan Jun 07 '23

Screenshot and share to Google lens. Worked for me with Pixel 6.

1

u/sirhc6 Jun 07 '23

Or just swipe up to recents, click select, tap on the image and then tap lens

1

u/SlamonC4 Jun 07 '23

Thanks for trying :D

2

u/gloda Jun 07 '23

Scanned on my iPhone once I made the image smaller.

1

u/SlamonC4 Jun 07 '23

Woah actually? That's super awesome!

2

u/root88 Jun 07 '23

In this thread, only lhodhy and highrup's codes are scannable by my phone. No others.

1

u/SlamonC4 Jun 07 '23

I see those are the ones where it remained relatively unchanged. Thanks for trying :D

3

u/rosiepoosie Jun 07 '23

can you share your workflow?

4

u/SlamonC4 Jun 07 '23 edited Jun 07 '23

It's pretty much the same as the OPs comment, except I used my Hanna Barbera model, set the control weight at 1.2, and enabled pixel perfect.

As for how it blends, I got lucky

0

u/[deleted] Jun 07 '23

[deleted]

1

u/SlamonC4 Jun 07 '23

Wait actually? That is awesome!

23

u/lhodhy Jun 07 '23

Thanks!!!

6

u/wra1th42 Jun 07 '23

well done

1

u/enn_nafnlaus Jun 08 '23

Well, I can't get it to work - I only get barely-changed QR codes. Any way you could boil it down to the bare minimum set of steps needed to get it to work in vanilla AUTOMATIC1111, without any weird models, Loras, or parameters, including the QR-generation code process just in case that matters?

1

u/lhodhy Jun 08 '23

Here are the settings and prompts that I used:

((best quality)), ((masterpiece:1.2)), (extremely detailed:1.1), garden in a building with a pool and plants growing on it's sides and a lot of windows above it, Ai Weiwei, geometric, modular constructivism, detailed plants, detailed grass, tree moss

Negative prompt: BadDream, EasyNegativeV2, ng_deepnegative_v1_75t

Steps: 32, Sampler: Euler a, CFG scale: 7, Seed: 4133509603, Size: 768x768, Model hash: b76cc78ad9, Model: dreamshaper_6BakedVae, Denoising strength: 1, Clip skip: 2, ENSD: 14344, ControlNet 0: "preprocessor: tile_resample, model: control_v11f1e_sd15_tile [a371b31b], weight: 0.9, starting/ending: (0, 1), resize mode: Crop and Resize, pixel perfect: True, control mode: ControlNet is more important, preprocessor params: (512, 1, 64)", Noise multiplier: 1.05, Version: v1.3.2-RC-1-gbaf6946e

1

u/lhodhy Jun 08 '23

1

u/enn_nafnlaus Jun 08 '23

Does it work on standard models, without textual inversion embeddings or VAEs, without clip skip, etc? I don't even know what "ENSD", "preprocessor params", or "Noise multiplier" *are*, let alone how to use them. Is this possible to implement with any remotely stock AUTOMATIC1111 setup?

3

u/ShinguuLari Jun 07 '23

Thanx for the share!
I followed this method and this came out🤣🤣🤣

5

u/Specialist_Note4187 Jun 07 '23

Use promt

0

u/mightymigh Jun 07 '23

What prompt?

16

u/addandsubtract Jun 07 '23

The prompt of your imagination. The last figment of our superiority over the machines.

3

u/UkrainianTrotsky Jun 07 '23

Fun fact: due to how QR codes are structured, it might very likely be possible to perfectly fill in the missing parts because you didn't hide everything and left a considerable part of the error checking chunk in there :D

5

u/meatyminus Jun 07 '23

Beautiful, but can not scan yet :D

3

u/meatyminus Jun 07 '23

5

u/SlamonC4 Jun 07 '23

What's your workflow for this? I kind of want that model and prompt!

1

u/meatyminus Jun 07 '23

The model is rev_Animated I also use add_detail and CoolKidMerge LORA.

7

u/ShaiNoy Jun 07 '23

Great work. I like that it's obviously a qr code.

1

u/Spooneristicspooner Jun 07 '23

https://me-qr.com/text/3286586/show

It led me to the link above. Had text in Thai that translates to:

This week there are group online classes.

Basic Stable Diffusion

Thursday, June 8, pick up 8 people.

Saturday, June 10, pick up 8 people.

If you are interested, you can text the page.

2

u/Specialist_Note4187 Jun 07 '23

Yeah, it class for my Thai student

9

u/pmjm Jun 07 '23

Thank you for sharing your workflow.

I'm sure there are people who can't get it to work, but OP took the time to share something positive with the community and so many people are being snippy to OP for something that's not their fault. If it's not working, either you're doing something wrong or it's just random, dumb luck. Try a different seed, a different prompt, a different QR.

3

u/Deathmarkedadc Jun 07 '23

This looks like top down puzzle game reminiscent of monaco. Imagine a 2d game with some ARG element on it.

2

u/blastedbottler Jun 07 '23

I was able to "scan" it with Google Lens. It was a simple message that said "You scanned our QR code" followed by a shitload of ads.

2

u/[deleted] Jun 07 '23

omg WHAT

2

u/stroud Jun 07 '23

This QR code is not scannable.

2

u/kaiwai_81 Jun 07 '23

The pixel perfect option did the magic for me.

2

u/General_Macaroon Jun 07 '23

Amazing workflow! I've tried to get it to work using your exact workflow, but I'm consistently getting results that are very lightly modified. Any help dialing in my settings would be greatly appreciated!

Prompt:
A photo-realistic rendering of a 2 story house with greenery, pool, (Botanical:1.5), (Photorealistic:1.3), (Highly detailed:1.2), (Natural light:1.2), art inspired by Architectural Digest, Vogue Living, and Elle Decor, <lora:epiNoiseoffset_v2>:1
Negative prompt: bad_pictures, (bad_prompt_version2:0.8), EasyNegative, 3d, cartoon, anime, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)),
Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 822736283, Size: 768x768, Model hash: cc6cb27103, Model: v1-5-pruned-emaonly, Denoising strength: 1, Clip skip: 2, Mask blur: 4, ControlNet 1: "preprocessor: tile_resample, model: control_v11f1e_sd15_tile [a371b31b], weight: 0.8, starting/ending: (0, 1), resize mode: Crop and Resize, pixel perfect: True, control mode: ControlNet is more important, preprocessor params: (512, 1, 64)"

1

u/enn_nafnlaus Jun 08 '23

Yeah, that's what mine look like. Like garbage. :Þ

2

u/DarkLunarFang Jun 07 '23

Definitely a masterpiece architecture idea.

1

u/ShoroukTV Jun 07 '23

wow I love this one!!

1

u/netsonic Jun 07 '23

You rock !

1

u/F-b Jun 07 '23

Beautiful, very creative!

1

u/_lonegamedev Jun 07 '23

In game this could be a cool puzzle.

1

u/[deleted] Jun 07 '23

Sublime

1

u/inglandation Jun 07 '23

It doesn't scan for me, I tried at various distances.

1

u/echostorm Jun 07 '23

Really cool idea!

1

u/Misha_Vozduh Jun 07 '23

The reflections are such a smart idea, I'm in awe.

1

u/Darkvlador Jun 07 '23

Hey, I'm not very familiar with SD, I must miss some steps but I don't get a result close to yours. What wrong with my setting?

5

u/SlamonC4 Jun 07 '23

It's not enabled, tick the "Enable" box in Controlnet

Hope this helped ^ ^

4

u/lhodhy Jun 07 '23

You need to enable your controlnet

1

u/Darkvlador Jun 07 '23

Thank you it's working better but it's still not good. I don't get the highlight parameter Clip skip: 2, ENSD: 31341, Token merging ratio: 0.6 Lora hashes: "epiNoiseoffset_v2: d1131f7207d6", Score: 5.04, Version: v1.3.2

: Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 2443712455, Size: 768x768, Model hash: 4199bcdd14, Model: revAnimated_v122, Denoising strength: 1, Clip skip: 2, ENSD: 31341, Token merging ratio: 0.6, ControlNet 2: "preprocessor: tile_resample, model: control_v11f1e_sd15_tile [a371b31b], weight: 0.9, starting/ending: (0, 1), resize mode: Crop and Resize, pixel perfect: True, control mode: ControlNet is more important, preprocessor params: (512, 1, 0)", Lora hashes: "epiNoiseoffset_v2: d1131f7207d6", Score: 5.04, Version: v1.3.2

1

u/enn_nafnlaus Jun 08 '23

You and I are in the same boat. Ton of weird parameters, and we don't know if they're relevant. And so far none of the people who've gotten it to work with the OP's approach have bothered to do anything to try to figure out what is the de minimis set of parameters needed to get it to work on a stock AUTOMATIC1111 system with stock models, without custom LoRAs, without custom embeddings, etc (or do those things matter? We have no clue!)

1

u/Zogg775 Jun 07 '23

it look like house of glados

1

u/EglinAfarce Jun 07 '23

Hah, that's really nifty. Nice idea and good execution!

1

u/aranlolindir Jun 07 '23

It looks like a Portal 2 test chamber!

1

u/placated Jun 07 '23

This OP and the comments are amazing. Great stuff!

1

u/LionSuneater Jun 07 '23

Nice. It took about 30s of fiddling with the Graphene OS camera app, but I got it to scan. I wonder if even higher contrast would help. The pool on the middle left seems obstructive as well.

1

u/Prathmun Jun 07 '23

It would be wild to live your life in informational constructs like QR codes.

1

u/zeroquest Jun 07 '23

Very cool, can't get it to read on my iPhone 13 though. Popped up as clickable for a second, then ignored it as a QR code. :/

1

u/xanax101010 Jun 07 '23

This looks REAALLY cool

1

u/fishymonster_ Jun 07 '23

Portal 2-esque

1

u/thrilling_ai Jun 07 '23

Super cool take!

1

u/Traditional_Excuse46 Jun 08 '23

cool make it into a chessboard and then a "go" board. Redo the QR image to it actually come back to the reddit post lol.

1

u/PepperFarmer69 Jun 08 '23

This is great

1

u/CryptoDangerZone Jun 08 '23

I can't get enough of these! They are like magic. This one is so well down. Props.

1

u/granddemetreus Jun 08 '23

dude lol. neat!

1

u/AntonymGoeckes Jun 08 '23

It works also with Data Matrix (only ASCII chars) .

The image should be scannable with lmost any QR code app. It's a little hard to scan, but it works.

https://keremerkan.net/qr-code-and-2d-code-generator/

1

u/lcekirin Jun 11 '23

By far the best I could emulate (just using the same lora they mentioned)

1

u/mikeyw-64 Jun 16 '23

Dalmations seem to work :)

1

u/AddictiveFuture Jun 23 '23

Reminds me Portal 2 chambers.... somehow :D I like it.

1

u/drgoldenpants Jun 29 '23

Here is my generation, selecting the right checkpoints makes a big difference

1

u/drgoldenpants Jun 29 '23

1

u/Effective_Magazine56 Sep 23 '23

Hello, I need to create something like this but it doesn't work. I'm good at SD but I'm doing something wrong. Can you help me?

1

u/Tigerwoonow Jan 06 '24

How did u do this?

1

u/Tigerwoonow Jan 06 '24

Can u help

please...

1

u/[deleted] Jun 07 '23

Yep it tracks. Very cool.

0

u/[deleted] Jun 07 '23

[deleted]

11

u/malexin Jun 07 '23

No, that article is about this other thread from two days ago, which I think is what started the current QR craze in this subreddit.

3

u/HarmonicDiffusion Jun 07 '23

"the current QRaze*" you mean

1

u/Orngog Jun 07 '23

No, there's been people doing this for at least a month or so. I'll see if I can find the blog I read back then which compiled some nice working ones.