<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Art on Robin Su</title><link>https://robinsujob.github.io/tags/art/</link><description>Recent content in Art on Robin Su</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Fri, 01 Sep 2023 00:00:00 +0800</lastBuildDate><atom:link href="https://robinsujob.github.io/tags/art/index.xml" rel="self" type="application/rss+xml"/><item><title>Art QR Code with ControlNet and Stable Diffusion</title><link>https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/</link><pubDate>Fri, 01 Sep 2023 00:00:00 +0800</pubDate><guid>https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/</guid><description>&lt;img src="https://robinsujob.github.io/" alt="Featured image of post Art QR Code with ControlNet and Stable Diffusion" /&gt;&lt;h2 id="background"&gt;Background
&lt;/h2&gt;&lt;p&gt;Over the past few months, there has been growing interest in combining Stable Diffusion with ControlNet to create artistic QR codes. This post was originally developed as part of an AWS workshop demonstrating how to deploy and use Stable Diffusion on AWS infrastructure.&lt;/p&gt;
&lt;p&gt;This post shares practical tips for working with Stable Diffusion and walks through the best practices for generating artistic QR codes.&lt;/p&gt;
&lt;p&gt;We will use QR codes as ControlNet input, integrating QR code data points into artistic images while keeping them scannable by QR code readers. With this technology, you can transform any QR code into a unique piece of art, expressing and conveying information in an entirely new way. Here are some examples:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Sample 1" class="gallery-image" data-flex-basis="240px" data-flex-grow="100" height="2000" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/sample1.jpg" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/sample1_hu_55ce0a96d66b54da.jpg 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/sample1_hu_76a851db4e696861.jpg 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/sample1.jpg 2000w" width="2000"&gt;
&lt;img alt="Sample 2" class="gallery-image" data-flex-basis="240px" data-flex-grow="100" height="2000" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/sample2.jpg" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/sample2_hu_58726bd2cf5fe70d.jpg 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/sample2_hu_4c6be33718f82540.jpg 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/sample2.jpg 2000w" width="2000"&gt;
&lt;img alt="Sample 3" class="gallery-image" data-flex-basis="240px" data-flex-grow="100" height="2000" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/sample3.jpg" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/sample3_hu_aa92c1059d5785be.jpg 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/sample3_hu_52c82c010083f7a4.jpg 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/sample3.jpg 2000w" width="2000"&gt;&lt;/p&gt;
&lt;h2 id="stable-diffusion-practical-tips"&gt;Stable Diffusion Practical Tips
&lt;/h2&gt;&lt;p&gt;As the ancient Chinese saying goes: &amp;ldquo;The beginning is always the hardest&amp;rdquo; and &amp;ldquo;Seek breadth while perfecting the details.&amp;rdquo; These correspond to the two most common challenges when working with Stable Diffusion: first, how to choose the right prompt strategy to generate images that meet expectations; and second, how to fine-tune image details so the final output meets production-quality requirements.&lt;/p&gt;
&lt;p&gt;Based on our experience helping users work with Stable Diffusion, we have compiled the following best practices for reference.&lt;/p&gt;
&lt;h3 id="prompt-engineering"&gt;Prompt Engineering
&lt;/h3&gt;&lt;p&gt;As Stable Diffusion versions continue to evolve and AI&amp;rsquo;s understanding of semantics gets closer to &amp;ldquo;common sense,&amp;rdquo; the requirements for effective prompts are becoming increasingly demanding. Many common prompt misconceptions can sometimes have adverse effects on image generation.&lt;/p&gt;
&lt;h4 id="basic-concepts"&gt;Basic Concepts
&lt;/h4&gt;&lt;p&gt;Prompts are divided into &lt;strong&gt;positive prompts&lt;/strong&gt; (what you want) and &lt;strong&gt;negative prompts&lt;/strong&gt; (what you don&amp;rsquo;t want), telling the AI what to include and what to exclude.&lt;/p&gt;
&lt;h4 id="common-misconceptions"&gt;Common Misconceptions
&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;Precision over quantity — describing a scene with the shortest words is more effective than natural language.&lt;/li&gt;
&lt;li&gt;Quality-improving descriptors should not be mindlessly stacked; more is not better.&lt;/li&gt;
&lt;li&gt;Common starters like &amp;ldquo;masterpiece&amp;rdquo; and &amp;ldquo;best quality&amp;rdquo; often become dead weight in prompts. These words were meaningful in the NovelAI era, when they were heavily used during model training for image evaluation. However, after continuous model refinement by authors on Civitai, these prompts barely show their intended effect in modern models.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="adjusting-prompt-weights"&gt;Adjusting Prompt Weights
&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;The default weight of each token is 1, decreasing from left to right.&lt;/li&gt;
&lt;li&gt;Prompt weights significantly affect the generated image.&lt;/li&gt;
&lt;li&gt;Use parentheses + colon + number to specify weight, e.g., &lt;code&gt;(one girl:1.5)&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="mind-the-prompt-order"&gt;Mind the Prompt Order
&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;Landscape tags first = smaller characters; character tags first = larger characters or half-body shots.&lt;/li&gt;
&lt;li&gt;Choose the correct order and syntax for prompts to more effectively render the desired scene.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="emojis-in-prompts"&gt;Emojis in Prompts
&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;Prompts support emojis, and they work with good expressiveness.&lt;/li&gt;
&lt;li&gt;For specific facial expressions or actions, adding emojis can achieve the desired effect.&lt;/li&gt;
&lt;li&gt;To prevent semantic drift, prefer emojis and minimize unnecessary complex syntax.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="recommended-camera-angle-prompts"&gt;Recommended Camera Angle Prompts
&lt;/h4&gt;&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Parameter&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;extreme closeup&lt;/td&gt;
 &lt;td&gt;Face close-up&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;close up&lt;/td&gt;
 &lt;td&gt;Head&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;medium close up&lt;/td&gt;
 &lt;td&gt;ID photo&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;medium shot&lt;/td&gt;
 &lt;td&gt;Half body&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;cowboy shot&lt;/td&gt;
 &lt;td&gt;No legs&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;medium full shot&lt;/td&gt;
 &lt;td&gt;No feet&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;full shot&lt;/td&gt;
 &lt;td&gt;Full body&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id="image-optimization"&gt;Image Optimization
&lt;/h3&gt;&lt;p&gt;Often we generate an image that&amp;rsquo;s not quite satisfactory and want to further optimize it, but don&amp;rsquo;t know where to start. Here are some best practices for parameter tuning:&lt;/p&gt;
&lt;h4 id="which-parameters-to-adjust"&gt;Which Parameters to Adjust
&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;CFG Scale&lt;/strong&gt;: The correlation between the image and the prompt. Higher values mean greater prompt influence and closer adherence to the prompt.
&lt;ul&gt;
&lt;li&gt;CFG 2–6: Creative but may be too distorted, not following the prompt. Fun for short prompts.&lt;/li&gt;
&lt;li&gt;CFG 7–10: Recommended for most prompts.&lt;/li&gt;
&lt;li&gt;CFG 10–15: Use when the prompt is detailed and clear.&lt;/li&gt;
&lt;li&gt;CFG 16–20: Not recommended unless the prompt is very detailed.&lt;/li&gt;
&lt;li&gt;CFG &amp;gt;20: Almost unusable.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sampling Steps&lt;/strong&gt;: More steps mean smaller, more precise adjustments per step, but proportionally increase generation time. For most samplers, more iterations produce better results, but beyond 50 steps, improvements become negligible.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sampling Method&lt;/strong&gt;: Different methods have different optimal step counts; comprehensive comparison is needed.
&lt;ul&gt;
&lt;li&gt;Euler a: Creative; different step counts produce different images. An efficient method for quickly testing prompt effects.&lt;/li&gt;
&lt;li&gt;DPM2 a Karras: Good for realistic models, hard to control after 30 steps.&lt;/li&gt;
&lt;li&gt;DPM++ 2M Karras: Excellent at high step counts, more details.&lt;/li&gt;
&lt;li&gt;DDIM: Fast convergence but low efficiency; good for inpainting.&lt;/li&gt;
&lt;li&gt;Different model and sampler combinations produce different results; the above is for reference only. When choosing sampling methods, it&amp;rsquo;s best to use X/Y/Z plots for comparison.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Seed&lt;/strong&gt;: The random seed often has a huge impact on composition and is the main source of randomness in SD. With the same seed and all other parameters fixed, you can reproduce (nearly) identical images. Once you find a suitable composition, fix the seed and fine-tune details — this is the recommended approach.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="how-to-find-optimal-parameters"&gt;How to Find Optimal Parameters
&lt;/h4&gt;&lt;p&gt;Use X/Y/Z plots to clearly compare results under different parameters, quickly locate suitable parameter ranges, and perform further generation control.&lt;/p&gt;
&lt;p&gt;&lt;img alt="X/Y/Z Plot Comparison" class="gallery-image" data-flex-basis="353px" data-flex-grow="147" height="1358" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image4.jpg" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image4_hu_77502e0855ea324.jpg 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image4_hu_f3805d232f87f8e3.jpg 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image4.jpg 2000w" width="2000"&gt;&lt;/p&gt;
&lt;h4 id="image-size-optimization"&gt;Image Size Optimization
&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;Image quality is not directly tied to image size.&lt;/li&gt;
&lt;li&gt;However, size does affect the subject and content to some extent.&lt;/li&gt;
&lt;li&gt;When the output size is too wide, multiple subjects may appear.&lt;/li&gt;
&lt;li&gt;Sizes above 1024 may produce undesirable results, and GPU memory pressure becomes significant. Small resolution + upscaling is recommended.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="optimizing-multi-character-and-wide-format-generation"&gt;Optimizing Multi-Character and Wide-Format Generation
&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;Using txt2img alone cannot effectively specify individual character features in multi-character scenarios.&lt;/li&gt;
&lt;li&gt;The recommended approach is to create a draft + img2img or ControlNet.&lt;/li&gt;
&lt;li&gt;For wide-format single-character generation, draft a sketch with color blocking to determine the main subject, or use ControlNet&amp;rsquo;s OpenPose for character skeleton.&lt;/li&gt;
&lt;li&gt;For multi-character scenes, use ControlNet&amp;rsquo;s OpenPose to specify character count; this also works for three-view drawings of the same character.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="hand-repair"&gt;Hand Repair
&lt;/h4&gt;&lt;p&gt;Send the image to img2img inpaint with similar prompts, placing &amp;ldquo;hand&amp;rdquo; prompts at the front. Set denoising strength based on how much you want hand features to change (below 0.25 if you just want completeness), keeping steps and CFG the same as txt2img. For more precise hand control, find a satisfactory hand reference image and use ControlNet&amp;rsquo;s Canny or OpenPose_hands preprocessor + model combined with inpaint.&lt;/p&gt;
&lt;h4 id="face-repair"&gt;Face Repair
&lt;/h4&gt;&lt;p&gt;When drawing images with small character subjects, facial distortion frequently occurs. Especially in the artistic QR code generation process described later, faces often break due to QR code data points. For facial inpainting, the &lt;strong&gt;ADetailer&lt;/strong&gt; plugin is recommended. It uses the YOLO algorithm for object detection — we configure it to detect character faces and provide prompts and models for facial inpainting. The plugin performs localized inpainting at detected face locations to complete the repair. ADetailer can handle both face and hand detection and repair, and can also reference LoRA models for localized inpainting.&lt;/p&gt;
&lt;p&gt;&lt;img alt="ADetailer Face Repair" class="gallery-image" data-flex-basis="445px" data-flex-grow="185" height="1078" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image5.jpg" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image5_hu_6367fc31bcade539.jpg 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image5_hu_5676d0dce49e6a81.jpg 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image5.jpg 2000w" width="2000"&gt;&lt;/p&gt;
&lt;h2 id="generating-artistic-qr-codes-with-controlnet"&gt;Generating Artistic QR Codes with ControlNet
&lt;/h2&gt;&lt;h3 id="step-1-optimize-the-qr-code"&gt;Step 1: Optimize the QR Code
&lt;/h3&gt;&lt;p&gt;A QR code is a pattern of black and white geometric shapes distributed in 2D space that records symbolic data. There are multiple encoding methods; we use the most universal and fundamental one: QR Code.&lt;/p&gt;
&lt;p&gt;The input QR code is one of the most important factors when generating artistic QR codes with SD. We mainly care about two characteristics:&lt;/p&gt;
&lt;p&gt;&lt;img alt="QR Code Structure" class="gallery-image" data-flex-basis="463px" data-flex-grow="193" height="1035" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image6.jpg" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image6_hu_b52fdd4bc2347dd6.jpg 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image6_hu_4f11b8a8789a497c.jpg 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image6.jpg 2000w" width="2000"&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Information contained in the QR code&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Regardless of the encoding method, the more character information a QR code carries, the more complex its visual black-and-white structure becomes. Complex structures heavily constrain artistic creativity during generation. Therefore, we first need to simplify the content length.&lt;/p&gt;
&lt;p&gt;For the most common use case — web links — shorten the URL first. There are many URL shortening tools available; choose freely. Note that within mainland China, use platforms with registered domain names, otherwise links may be blocked by WeChat, browsers, etc.&lt;/p&gt;
&lt;p&gt;&lt;img alt="URL Length Comparison" class="gallery-image" data-flex-basis="434px" data-flex-grow="180" height="1105" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image7.jpg" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image7_hu_994cc7c8be691b7a.jpg 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image7_hu_5ecf3e0fd8a69b85.jpg 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image7.jpg 2000w" width="2000"&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. How the QR code is presented&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;With technological development, QR codes no longer only support black and white square patterns; both positioning points and modules support diverse presentation styles.&lt;/p&gt;
&lt;p&gt;In practice, try different module styles to achieve the desired generation effect. The following images show how different QR code styles affect the final result:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Different Module Styles" class="gallery-image" data-flex-basis="665px" data-flex-grow="277" height="721" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image8.jpg" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image8_hu_f5428857b68a719e.jpg 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image8_hu_e03ceb67ae15f93d.jpg 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image8.jpg 2000w" width="2000"&gt;
&lt;img alt="Different QR Code Style Comparison" class="gallery-image" data-flex-basis="474px" data-flex-grow="197" height="1012" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image9.jpg" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image9_hu_19fbc491720a35dd.jpg 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image9_hu_299366d2f08403a0.jpg 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image9.jpg 2000w" width="2000"&gt;&lt;/p&gt;
&lt;p&gt;Generation parameters:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;span class="lnt"&gt;8
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Prompt: mountain, green grassland, sky, cloud, bird, blue sky, no human, day, wide shot, flying, border, outdoors, white bird, scenery
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Negative prompt: easynegative
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Steps: 40, Sampler: DPM++ 2M Karras, CFG scale: 6, Seed: 3943213078, Size: 872x872,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Model hash: 876b4c7ba5, Model: cetusMix_Whalefall2, Clip skip: 2,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ControlNet: &amp;#34;preprocessor: none, model: control_v1p_sd15_qrcode_monster [a6e58995],
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;weight: 1.35-1.5, starting/ending: (0.05, 1), resize mode: Resize and Fill,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;pixel perfect: True, control mode: Balanced, preprocessor params: (512, 64, 64)&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Version: v1.3.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="step-2-create-the-base-qr-code"&gt;Step 2: Create the Base QR Code
&lt;/h3&gt;&lt;p&gt;After understanding the key points above, use a QR code generation tool to create a base QR code for SD input. There are many web-based generators available; choose freely. For convenience, here is a useful WebUI plugin:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Anthony&amp;rsquo;s QR Toolkit&lt;/strong&gt;: Integrated QR code generation and optimization tool for WebUI
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://github.com/antfu/sd-webui-qrcode-toolkit" target="_blank" rel="noopener"
 &gt;https://github.com/antfu/sd-webui-qrcode-toolkit&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img alt="QR Toolkit Configuration" class="gallery-image" data-flex-basis="352px" data-flex-grow="146" height="1363" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image10.jpg" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image10_hu_7dd3f5c4533a8b1f.jpg 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image10_hu_a9e7cdd31e40fc49.jpg 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image10.jpg 2000w" width="2000"&gt;&lt;/p&gt;
&lt;p&gt;After creating the QR code, click &amp;ldquo;Download&amp;rdquo; to save it locally, or click &amp;ldquo;Send to ControlNet&amp;rdquo; to pass it directly for the next step.&lt;/p&gt;
&lt;h3 id="step-3-determine-the-art-style"&gt;Step 3: Determine the Art Style
&lt;/h3&gt;&lt;p&gt;The core of creating art with Stable Diffusion is choosing the right model + prompts. Before creating artistic QR codes, we recommend generating an image without ControlNet first to test the style.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Test Generation Result" class="gallery-image" data-flex-basis="506px" data-flex-grow="210" height="948" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image11.jpg" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image11_hu_67bbdab4025fc3f5.jpg 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image11_hu_c83f3b551e0924d7.jpg 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image11.jpg 2000w" width="2000"&gt;&lt;/p&gt;
&lt;p&gt;Generation parameters:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Prompt: mountain, green grassland, sky, cloud, bird, blue sky, no human, day, wide shot, flying, border, outdoors, white bird, scenery
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Negative prompt: easynegative
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 4078355702,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Face restoration: CodeFormer, Size: 512x512,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Model hash: 876b4c7ba5, Model: cetusMix_Whalefall2, Clip skip: 2, Version: v1.3.2
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="step-4-import-qr-code-into-controlnet"&gt;Step 4: Import QR Code into ControlNet
&lt;/h3&gt;&lt;p&gt;After confirming the image style, upload the unprocessed QR code to ControlNet. Pay attention to these configuration options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&amp;ldquo;Enable&amp;rdquo; button&lt;/strong&gt;: Check to ensure ControlNet is active during generation&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Model selector&lt;/strong&gt;: Select &lt;code&gt;control_v1p_sd15_qrcode_monster&lt;/code&gt; to strengthen QR code control&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Control weight&lt;/strong&gt;: For the qrcode_monster model, we recommend setting it between 1.1–1.6&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Guidance start/end timing&lt;/strong&gt;: Start timing recommended between 0–0.1, end timing recommended at 1&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img alt="ControlNet Configuration" class="gallery-image" data-flex-basis="240px" data-flex-grow="100" height="1997" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image12.jpg" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image12_hu_25f078fb5a3943d7.jpg 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image12_hu_f4879ef6b64e3a2e.jpg 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image12.jpg 2000w" width="2000"&gt;&lt;/p&gt;
&lt;p&gt;In the txt2img configuration, adjust two key values:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Sampling steps&lt;/strong&gt;: Recommended 30–50 (the default of 20 is insufficient for generating high-quality QR code images)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Width/Height&lt;/strong&gt;: Match the original QR code aspect ratio from ControlNet&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img alt="txt2img Parameter Adjustment" class="gallery-image" data-flex-basis="251px" data-flex-grow="104" height="1909" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image13.jpg" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image13_hu_ed705bdb20a2cff1.jpg 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image13_hu_e4b0ba433aa581d9.jpg 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image13.jpg 2000w" width="2000"&gt;&lt;/p&gt;
&lt;p&gt;After all parameters are configured, click generate. Here we can see a good result — the QR code passes scanning tests on mobile phones.&lt;/p&gt;
&lt;p&gt;If the generated QR code doesn&amp;rsquo;t meet expectations, try fine-tuning the following parameters and increase the total batch count, iterating to approach the desired result:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Prompts&lt;/li&gt;
&lt;li&gt;Sampling method&lt;/li&gt;
&lt;li&gt;ControlNet control weight&lt;/li&gt;
&lt;li&gt;ControlNet guidance start/end timing&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img alt="Generation Result" class="gallery-image" data-flex-basis="259px" data-flex-grow="108" height="1849" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image14.jpg" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image14_hu_748dcd2b923a108f.jpg 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image14_hu_2ed397a762cf9367.jpg 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image14.jpg 2000w" width="2000"&gt;
&lt;img alt="Parameter Fine-tuning" class="gallery-image" data-flex-basis="418px" data-flex-grow="174" height="1146" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image15.jpg" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image15_hu_ad317a8ce958a578.jpg 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image15_hu_e79e5ee60f7554ba.jpg 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image15.jpg 2000w" width="2000"&gt;&lt;/p&gt;
&lt;p&gt;When necessary, use the X/Y/Z Plot in &amp;ldquo;Scripts&amp;rdquo; to compare QR code generation effects under different parameters. Here we compared ControlNet&amp;rsquo;s control weight and guidance start timing:&lt;/p&gt;
&lt;p&gt;&lt;img alt="X/Y/Z Plot Comparison" class="gallery-image" data-flex-basis="740px" data-flex-grow="308" height="648" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image16.jpg" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image16_hu_30abd11948c76d54.jpg 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image16_hu_ee7d7898db9411be.jpg 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/image16.jpg 2000w" width="2000"&gt;&lt;/p&gt;
&lt;h2 id="enhancing-qr-codes-with-openpose"&gt;Enhancing QR Codes with OpenPose
&lt;/h2&gt;&lt;p&gt;Building on the QR code techniques above, we can take it further by combining &lt;strong&gt;OpenPose&lt;/strong&gt; with QR codes to create even more dynamic and artistic results. OpenPose generates skeleton maps of human poses, which serve as an additional ControlNet input to control character poses in the generated image.&lt;/p&gt;
&lt;h3 id="example-showcase"&gt;Example Showcase
&lt;/h3&gt;&lt;p&gt;Here are some example results combining OpenPose pose control with QR code generation:&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th style="text-align: center"&gt;&lt;/th&gt;
 &lt;th style="text-align: center"&gt;&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td style="text-align: center"&gt;&lt;img alt="OpenPose + QR Code" class="gallery-image" data-flex-basis="400px" data-flex-grow="166" height="540" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/1-open-pose-code.png" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/1-open-pose-code_hu_1827644c6b490e79.png 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/1-open-pose-code.png 900w" width="900"&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;img alt="Girl with Car" class="gallery-image" data-flex-basis="401px" data-flex-grow="167" height="536" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/2-girl-with-car.png" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/2-girl-with-car_hu_d779f7fe9c1958a9.png 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/2-girl-with-car.png 896w" width="896"&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The prompt used for the example above:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;(school girl:1.6, walking), (a car, side view, to left), (residential area, cherry trees)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Negative prompt: (worst quality:1.6),(low quality:1.6), (inaccurate limb:1.2),bad composition, inaccurate eyes, easynegative
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Steps: 50, Sampler: Euler a, CFG scale: 7, Seed: 3408317133, Size: 900x540, Model: cetusMix_Whalefall2
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="environment-setup-enable-multiple-controlnet-units"&gt;Environment Setup: Enable Multiple ControlNet Units
&lt;/h3&gt;&lt;p&gt;To use OpenPose and QR Code ControlNet simultaneously, you need at least &lt;strong&gt;2 ControlNet Units&lt;/strong&gt; enabled:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Settings&lt;/strong&gt; → &lt;strong&gt;ControlNet&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Set the &lt;strong&gt;Multi ControlNet&lt;/strong&gt; unit count to &lt;strong&gt;2&lt;/strong&gt; (or more)&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Apply Settings&lt;/strong&gt;, then &lt;strong&gt;Reload UI&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img alt="Settings" class="gallery-image" data-flex-basis="753px" data-flex-grow="313" height="801" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/3-setting.png" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/3-setting_hu_b5e6a63896ebda6.png 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/3-setting_hu_8b6d41a6102ea411.png 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/3-setting_hu_ecc7edb38c7f398b.png 2400w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/3-setting.png 2514w" width="2514"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Set Multi ControlNet Units" class="gallery-image" data-flex-basis="910px" data-flex-grow="379" height="855" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/4-set-multi-unit.png" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/4-set-multi-unit_hu_b5d1b2f4387cd450.png 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/4-set-multi-unit_hu_26545b7bcc39a476.png 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/4-set-multi-unit_hu_1bdf0964a8df41e6.png 2400w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/4-set-multi-unit.png 3245w" width="3245"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Reload UI" class="gallery-image" data-flex-basis="534px" data-flex-grow="222" height="1486" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/5-reload-ui.png" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/5-reload-ui_hu_3b3ab1cb73bf46f3.png 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/5-reload-ui_hu_e849a8fb6bba1f41.png 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/5-reload-ui_hu_f3f3f518f7878675.png 2400w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/5-reload-ui.png 3310w" width="3310"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Verify Result" class="gallery-image" data-flex-basis="376px" data-flex-grow="156" height="1030" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/6-check-result.png" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/6-check-result_hu_1ab84bcffc2484d0.png 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/6-check-result_hu_85b1c58013b0518d.png 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/6-check-result.png 1616w" width="1616"&gt;&lt;/p&gt;
&lt;h3 id="import-skeleton-data-and-enable-openpose"&gt;Import Skeleton Data and Enable OpenPose
&lt;/h3&gt;&lt;ol&gt;
&lt;li&gt;Open the &lt;strong&gt;OpenPose Editor&lt;/strong&gt; extension&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Load JSON&lt;/strong&gt; to import your prepared skeleton pose data&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Send to txt2img&lt;/strong&gt; to transfer the pose to ControlNet&lt;/li&gt;
&lt;li&gt;In ControlNet &lt;strong&gt;Unit 0&lt;/strong&gt;, enable ControlNet and select the model &lt;strong&gt;control_v11p_sd15_openpose&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img alt="Import Pose Data" class="gallery-image" data-flex-basis="547px" data-flex-grow="227" height="1448" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/7-import-pose.png" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/7-import-pose_hu_b2a0db80c07e8fdd.png 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/7-import-pose_hu_536c91b4faef4e8e.png 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/7-import-pose_hu_e0f0e9ff4141a491.png 2400w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/7-import-pose.png 3301w" width="3301"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Enable OpenPose ControlNet" class="gallery-image" data-flex-basis="220px" data-flex-grow="91" height="1735" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/8-enable-openpose.png" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/8-enable-openpose_hu_f0fb744ed7c07583.png 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/8-enable-openpose.png 1595w" width="1595"&gt;&lt;/p&gt;
&lt;h3 id="import-qr-code-and-configure-generation"&gt;Import QR Code and Configure Generation
&lt;/h3&gt;&lt;ol&gt;
&lt;li&gt;Switch to &lt;strong&gt;ControlNet Unit 1&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Upload your QR code image&lt;/li&gt;
&lt;li&gt;Select the model &lt;strong&gt;control_v1p_sd15_qrcode_monster&lt;/strong&gt; with a &lt;strong&gt;Control Weight of 1.7&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Set &lt;strong&gt;Sampling Steps&lt;/strong&gt; to 30–50 for better quality&lt;/li&gt;
&lt;li&gt;Adjust &lt;strong&gt;Width/Height&lt;/strong&gt; to match your desired output resolution&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img alt="Enable QR Code Monster" class="gallery-image" data-flex-basis="233px" data-flex-grow="97" height="1716" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/9-enable-qr-monster.png" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/9-enable-qr-monster_hu_48432b44047ff4a8.png 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/9-enable-qr-monster_hu_5ed8c8f73f0276dc.png 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/9-enable-qr-monster.png 1668w" width="1668"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Set Width and Height" class="gallery-image" data-flex-basis="228px" data-flex-grow="95" height="1737" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/10-set-hw.png" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/10-set-hw_hu_e0393aac628b989a.png 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/10-set-hw_hu_f56c4be88d52317e.png 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/10-set-hw.png 1656w" width="1656"&gt;&lt;/p&gt;
&lt;h3 id="prompts-and-generation"&gt;Prompts and Generation
&lt;/h3&gt;&lt;p&gt;Set your prompts for the final generation:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Positive prompt:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;(1girl:1.6, side lying sleep, on the garden, sunflowers), wooden floor
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Negative prompt:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;extra hands, extra fingers, extra legs, fewer fingers, (low quality, worst quality:1.4), (bad anatomy), (inaccurate limb:1.2),bad composition, inaccurate eyes, extra digit,fewer digits,(extra arms:1.2), signature, easynegative
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="Set Prompts" class="gallery-image" data-flex-basis="1108px" data-flex-grow="461" height="719" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/11-set-prompt.png" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/11-set-prompt_hu_140869ed3fe0cac5.png 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/11-set-prompt_hu_811ca3a0bd1bbe33.png 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/11-set-prompt_hu_c793fa54f7ad3c77.png 2400w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/11-set-prompt.png 3320w" width="3320"&gt;&lt;/p&gt;
&lt;h3 id="results"&gt;Results
&lt;/h3&gt;&lt;p&gt;Here is the final generated result combining OpenPose and QR code:&lt;/p&gt;
&lt;p&gt;&lt;img alt="OpenPose + QR Code Result" class="gallery-image" data-flex-basis="453px" data-flex-grow="189" height="1739" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/12-openpose-qrcode.png" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/12-openpose-qrcode_hu_1dda73f82d03b7f1.png 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/12-openpose-qrcode_hu_559208d515c67a7d.png 1600w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/12-openpose-qrcode_hu_a9a88a4430cb2aa3.png 2400w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/12-openpose-qrcode.png 3288w" width="3288"&gt;&lt;/p&gt;
&lt;p&gt;By cleverly offsetting the QR code position and applying composition techniques, the viewer&amp;rsquo;s focus is effectively shifted from the QR code to the character itself, creating a more natural and harmonious overall image.&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th style="text-align: center"&gt;&lt;img class="gallery-image" data-flex-basis="355px" data-flex-grow="148" height="675" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/13-lying-sleep-openpose.png" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/13-lying-sleep-openpose_hu_aea52875040ebca6.png 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/13-lying-sleep-openpose.png 1000w" width="1000"&gt;&lt;/th&gt;
 &lt;th style="text-align: center"&gt;&lt;img class="gallery-image" data-flex-basis="357px" data-flex-grow="148" height="672" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/14-openpose.png" srcset="https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/14-openpose_hu_3e8ab8bf2aeed12d.png 800w, https://robinsujob.github.io/p/art-qr-code-controlnet-stable-diffusion/images/14-openpose.png 1000w" width="1000"&gt;&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id="fine-tuning-tips"&gt;Fine-Tuning Tips
&lt;/h3&gt;&lt;p&gt;To achieve the best results when combining OpenPose with QR codes, consider adjusting:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Prompts&lt;/strong&gt;: Experiment with different scene descriptions and character poses&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sampling method&lt;/strong&gt;: Try different samplers (Euler a, DPM++ 2M Karras, etc.)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Skeleton structure and position&lt;/strong&gt;: Adjust the pose skeleton to avoid overlapping with QR code critical areas&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Control weight&lt;/strong&gt;: Balance between OpenPose (pose accuracy) and QR code (scannability) weights&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Guidance start/end timing&lt;/strong&gt;: Fine-tune when each ControlNet kicks in during the denoising process&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="appendix-controlnet-qrcode-model-selection"&gt;Appendix: ControlNet QRCode Model Selection
&lt;/h2&gt;&lt;p&gt;To date, &lt;strong&gt;QRCode Monster&lt;/strong&gt; is the model with the highest QR code control success rate and best image fusion effect. It can be downloaded from HuggingFace:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://huggingface.co/monster-labs/control_v1p_sd15_qrcode_monster" target="_blank" rel="noopener"
 &gt;QRCode Monster - HuggingFace&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Another option is &lt;strong&gt;QR Pattern v2.0&lt;/strong&gt;, best used with IoC Lab&amp;rsquo;s Brightness model as an auxiliary to improve local contrast. However, based on our testing, this model introduces more interference that may significantly alter the image style. Downloads:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://civitai.com/models/90940/controlnet-qr-pattern-qr-codes" target="_blank" rel="noopener"
 &gt;QR Pattern v2.0 - Civitai&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://huggingface.co/ioclab/ioc-controlnet" target="_blank" rel="noopener"
 &gt;IoC Lab ControlNet - HuggingFace&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="references"&gt;References
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://catalog.us-east-1.prod.workshops.aws/workshops/facdf921-2eea-4638-bc01-522e1eef3dc5" target="_blank" rel="noopener"
 &gt;AIGC Stable Diffusion Workshop&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://antfu.me/posts/ai-qrcode-101" target="_blank" rel="noopener"
 &gt;QR Toolkit by Anthony Fu&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://huggingface.co/monster-labs/control_v1p_sd15_qrcode_monster" target="_blank" rel="noopener"
 &gt;QRCode Monster - HuggingFace&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://huggingface.co/ioclab/ioc-controlnet" target="_blank" rel="noopener"
 &gt;IoC Lab ControlNet - HuggingFace&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;

 &lt;blockquote&gt;
 &lt;p&gt;Original post: &lt;a class="link" href="https://aws.amazon.com/cn/blogs/china/art-qr-code-generation-with-controlnet-ai-painting-solution-based-on-stable-diffusion/" target="_blank" rel="noopener"
 &gt;Art QR Code Generation with ControlNet - AI Painting Solution Based on Stable Diffusion&lt;/a&gt;&lt;/p&gt;

 &lt;/blockquote&gt;</description></item></channel></rss>