Embed a QR code in art Scannable QR code

Make a piece of artwork that a phone camera still reads as a QR code.

Same lesson, three subjects

Step by step

Skill level
  1. Prompt

    1 · What to write in the prompt

    The ControlNet already carries the code, so the prompt does not have to draw it. What it has to supply is light against dark in the places the code needs it.This example asked for ragged dark storm cloud tearing across a bright dawn sky far below a skyharbor, torn vapour and shafts of light, ethereal, dreamlike, flowing, painterly, luminous, incredible detail, with worst quality, bad lighting, deformed, ugly, low contrast in the negative prompt.Prompts that describe blocks and hard shadows compete with the code, and come back looking like a barcode with a picture behind it.
  2. Workflows

    2 · Type in what the code should say

    The Workflows card has . Type the text or URL you want the code to carry into it; this example used https://aihorde.net.Filling that field is what puts the request onto the QR workflow, so leaving it empty gets you an ordinary picture.
  3. Model & style

    3 · Pick a model that can run it

    This example used AlbedoBase XL (SDXL).The QR workflow is served for Stable Diffusion 1.5 and SDXL models. Pick anything else and the panel says so, and the QR field is disabled.
  4. Size

    4 · Keep it large

    1024×1024.Drawn small, the code has fewer pixels per square, and it stops scanning long before it starts looking wrong to you.
  5. Sampling

    5 · Use the settings that were scan-tested

    These four go together. 7.5, 25 , k_euler and the normal with Karras off are the set that was checked against a phone camera, and a code made with three of them does not read.How hard the code is held onto the picture is the . This recipe sends none, so the worker holds the code at the workflow's own baseline, which is what the examples were made at.The example pictures for this step are the same request across the guidance range.
    The same picture rendered at 7
    Guidance 7
    The same picture rendered at 20
    Guidance 20
    Sampling · Interactive explorer Guidance (CFG) How strongly the model is pushed to follow your prompt.
  6. 6 · Send it, then scan it

    Press Generate, and point a phone at the result before you trust it.When a code does not scan, the usual causes are, in order:
    • something geometric in the prompt (a skyline, a building, a garden) taking the pixels the code needs
    • a model that draws flat areas and smooths the code away
    • plain luck with the seed
    Try another seed before changing anything else: that is how these examples were made, the first seed that decoded being the one you see.QR jobs are never batched, so each image queues on its own, and they run slower than plain ones. Expect anything from a few seconds to a few minutes.
    This run took about 38 seconds and cost 78 kudos.

Where next

You can now make artwork that still scans. The last technique blends a picture with a few reference pictures, instead of repainting or tracing it. It runs only on Stable Cascade models, and few workers carry those, so you may have to read it on a day you cannot run it.