# Creative QR Codes with ControlNet

{% hint style="info" %}
reference: <https://stable-diffusion-art.com/qr-code/#Japanese_girl>
{% endhint %}

## **Table of contents**

* <mark style="color:blue;">Step 1:</mark> Clone a project from GitHub
* <mark style="color:blue;">Step 2:</mark> Open with GitHub Desktop. Click "Clone"
* <mark style="color:blue;">Step 3:</mark> Install some "Plug-in-board", such as "resource"
* <mark style="color:blue;">Step 4:</mark> Cick terminal input"make prepare" -->"enter"
* <mark style="color:blue;">Step 5:</mark> In termal, input"make run" -->"enter"
* <mark style="color:blue;">Step 6:</mark> Go to img2img to finish the steps.

## 1.Clone a project from GitHub

<figure><img src="https://206398537-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fGxYFvZDLzWe4Z2ZOfR%2Fuploads%2Fyvzf8L63t1RGqIGw3NSE%2FScreenshot%202023-06-12%20at%202.39.58%20pm.png?alt=media&#x26;token=681ee758-f634-46c7-95ca-0d1b18147a2d" alt=""><figcaption></figcaption></figure>

## 2.Open with GitHub Desktop. Click "Clone"

<figure><img src="https://206398537-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fGxYFvZDLzWe4Z2ZOfR%2Fuploads%2FIHFKveio0JexTGseewg3%2FScreenshot%202023-06-12%20at%202.41.03%20pm.png?alt=media&#x26;token=daaf8ba7-36ad-4178-aa02-aca8ca97a53b" alt=""><figcaption></figcaption></figure>

## 3.Install some "Plug-in-board", such as "resource".

<figure><img src="https://206398537-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fGxYFvZDLzWe4Z2ZOfR%2Fuploads%2FAXberriNe7BBR3Fuw1Aw%2FScreenshot%202023-06-12%20at%202.46.58%20pm.png?alt=media&#x26;token=3a4656d6-a75f-4864-a33b-3b13acfb4dd2" alt=""><figcaption></figcaption></figure>

## 4.Cick terminal input"make prepare" -->"enter"

<figure><img src="https://206398537-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fGxYFvZDLzWe4Z2ZOfR%2Fuploads%2FymxknwvkZ14JFJkpPkMp%2FScreenshot%202023-06-12%20at%203.37.10%20pm.png?alt=media&#x26;token=4c90d14a-6e39-4a40-ba1f-32bcc61f953e" alt=""><figcaption></figcaption></figure>

## 5.In termal, input"make run" -->"enter"

Then it will generate a URL like: *<http://127.0.0.1:7860>, click it to go to* stable diffusio&#x6E;*.*

## 6.Go to img2img

Here are the prompt of Mechanical girl:

**prompt**: 1mechanical girl,ultra realistic details, portrait, global illumination, shadows, octane render, 8k, ultra sharp,intricate, ornaments detailed, cold colors, metal, egypician detail, highly intricate details, realistic light, trending on cgsociety, glowing eyes, facing camera, neon details, machanical limbs,blood vessels connected to tubes,mechanical vertebra attaching to back,mechanical cervial attaching to neck,sitting,wires and cables connecting to head

**negative prompt**: ugly, disfigured, low quality, blurry

**Upload the QR code to the img2img canvas.**

<figure><img src="https://206398537-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fGxYFvZDLzWe4Z2ZOfR%2Fuploads%2FQMmReXWrY7ivDe3bDVWZ%2FScreenshot%202023-06-12%20at%203.51.47%20pm.png?alt=media&#x26;token=c573c010-876f-43f4-ab0b-4d281331d0b0" alt=""><figcaption></figcaption></figure>

Enter the following image-to-image settings.

* **Resize mode**: Just resize
* **Sampling method**: DPM++2M Karras
* **Sampling step**: 50
* **Width**: 768
* **Height**: 768
* **CFG Scale**: 7
* **Denoising strength**: 0.75

<figure><img src="https://206398537-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fGxYFvZDLzWe4Z2ZOfR%2Fuploads%2FBHK7JLQz26CZTzMOGg4B%2FScreenshot%202023-06-12%20at%203.54.32%20pm.png?alt=media&#x26;token=369d0480-5cd5-49f9-bf53-161cca200ece" alt=""><figcaption></figcaption></figure>

**Upload the QR code to ControlNet‘s image canvas.**

<figure><img src="https://206398537-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fGxYFvZDLzWe4Z2ZOfR%2Fuploads%2FkZIgszEUr8VPlWEOfIoX%2FScreenshot%202023-06-12%20at%203.55.32%20pm.png?alt=media&#x26;token=23cb68b7-237f-4c08-8853-a30e6c0fcd59" alt=""><figcaption></figcaption></figure>

**Enter the following ControlNet settings.**

* **Enable**: Yes
* **Control Type**: Tile
* **Preprocessor**: tile\_resample
* **Model**: control\_xxx\_tile
* **Control Weight**: 0.87
* **Starting Control Step**: 0.23
* **Ending Control Step**: 0.9

<figure><img src="https://206398537-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fGxYFvZDLzWe4Z2ZOfR%2Fuploads%2FjvZc4VU6M0cFKc2SVo5q%2FScreenshot%202023-06-12%20at%203.56.52%20pm.png?alt=media&#x26;token=ff20ce91-ffc4-4fde-84df-738fe90c2b77" alt=""><figcaption></figcaption></figure>

Press **Generate**. -->click"save" -->click"download"

When you are successful, click termal in VS Code, then "control + C" to finish the working.

Here are our outputs. High five\~\~\~

<div><figure><img src="https://206398537-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fGxYFvZDLzWe4Z2ZOfR%2Fuploads%2FtLWSktho9F1IK9KglmXO%2F00001-4244295426.png?alt=media&#x26;token=d118eb0b-6133-4de4-9c97-c6204bbddf2a" alt=""><figcaption></figcaption></figure> <figure><img src="https://206398537-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fGxYFvZDLzWe4Z2ZOfR%2Fuploads%2FADNjJMWdPJ9jS1HRdgT1%2F00002-725946248.png?alt=media&#x26;token=1863f557-af98-4574-b8ff-445d072305a6" alt=""><figcaption></figcaption></figure></div>

## Below are images that generated by stable diffusion.

<div><figure><img src="https://206398537-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fGxYFvZDLzWe4Z2ZOfR%2Fuploads%2FyUg1tenWzoVNZA3N9r8g%2F00002-1015468391.png?alt=media&#x26;token=0a74cc24-7fc2-4ca5-8d56-1e26fd36ac81" alt=""><figcaption></figcaption></figure> <figure><img src="https://206398537-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fGxYFvZDLzWe4Z2ZOfR%2Fuploads%2F92mvioD88YrNrVEnNh5C%2F00005-1015468454.png?alt=media&#x26;token=97e8fd9d-08ab-4824-b4fa-1ab1cdb2512b" alt=""><figcaption></figcaption></figure></div>

<div><figure><img src="https://206398537-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fGxYFvZDLzWe4Z2ZOfR%2Fuploads%2FPsGuIRht1lC6U0t26UaK%2F00004-584098645.png?alt=media&#x26;token=f25df53c-fdcd-49ce-8d48-c41b778d8e08" alt=""><figcaption></figcaption></figure> <figure><img src="https://206398537-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fGxYFvZDLzWe4Z2ZOfR%2Fuploads%2F6MgurHcEYT9HQEhZpJ7T%2F00006-1015468454.png?alt=media&#x26;token=616e0c51-830a-481b-84d9-24ec883df152" alt=""><figcaption></figcaption></figure></div>
