【stable-diffuision-webui】controlnet制作動(dòng)漫二維碼(丐版)


# 主要參考
首創(chuàng)者博文:[AI生成可掃碼圖像 — 新 ControlNet 模型展示](https://zhuanlan.zhihu.com/p/634933351)?
光照生成模型C站說明:https://civitai.com/models/80536/lighting-based-picture-control-controlne
擴(kuò)展閱讀:https://aigc.ioclab.com/sd-showcase/light_controlnet.html
他人效果展示:https://www.pinterest.co.uk/technonatorr/qr-codes-produced-by-ai/
controlnet模型下載地址:https://huggingface.co/lllyasviel/ControlNet-v1-1/tree/main
## 手把手教程:
**注意**:測試?yán)镄Ч町悂碜?`SD基礎(chǔ)模型`和`VAE`
# DIY步驟
需要先安裝好stable-diffusion-webui 以及controlnet插件,以及基礎(chǔ)模型
下圖為實(shí)際生成過程,中途生成也有失敗,需要`仔細(xì)檢查參數(shù)`,具體見截圖
## 1. 在線生成二維碼(可自己百度)
https://cli.im/url
本博文`用的是? https://qr.io/
## 2.1 controlnet相關(guān)模型下載
controlnet安裝:https://github.com/Mikubill/sd-webui-controlnet
光照控制模型?control_v1p_sd15_brightness.safetensors:https://huggingface.co/ioclab/ioc-controlnet/blob/main/models/control_v1p_sd15_brightness.safetensors
controlnet_11_tile: https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11f1e_sd15_tile.pth
## 2.2? vae下載 (`可跳過`,如果想和本文一模一樣)
鏈接:https://pan.baidu.com/s/1b9nhcTJs60-Z4CsCPucchw?pwd=0619
名字:kawaii2D_kawaii2DPrunedFp16.vae?
也可以使用其他動(dòng)漫vae ,效果略有差異
默認(rèn)的 anything-v4.5-pruned.vae.pt 顏色會(huì)差一點(diǎn)
## 3 參數(shù)設(shè)置
### 3.1 總參數(shù)
base Model: anything-v4.5-pruned 以及相關(guān)vae? (可以自己選)
·重要:Sampler: DPM++ 2M Karras
> a girl,best quality, ultra-detailed, extremely detailed,extremely delicate and beautiful, floating, high resolution,, (masterpiece, best quality, very detailed, Ultra HD: 1.2)
Negative prompt: nsfw, (worst quality, bad quality:1.6), lowres, signature, watermark, username, easynegative
Steps: 25, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 3447199121, Size: 512x512, Model hash: 6e430eb514, Model: anything-v4.5-pruned, Clip skip: 2, ENSD: 31337, ControlNet 0: "preprocessor: inpaint_global_harmonious, model: control_v1p_sd15_brightness [5f6aa6ed], weight: 0.35, starting/ending: (0, 1), resize mode: Crop and Resize, pixel perfect: True, control mode: Balanced, preprocessor params: (-1, 64, 64)", ControlNet 1: "preprocessor: inpaint_global_harmonious, model: control_v11f1e_sd15_tile [a371b31b], weight: 0.65, starting/ending: (0.35, 0.75), resize mode: Crop and Resize, pixel perfect: True, control mode: Balanced, preprocessor params: (-1, 64, 64)"
#### 上傳生成的圖片獲取生成信息
原圖鏈接:https://pan.baidu.com/s/1rQWS5Un65YM8w0b-3wQtNg?pwd=0706?
提取碼:0706

### 3.2? controlnet -brightness模型的設(shè)置(第一個(gè)網(wǎng)絡(luò))
ControlNet 0
?model: control_v1p_sd15_brightness [5f6aa6ed], weight: 0.35, starting/ending: (0, 1)

### 3.3? controlnet -tile 模型的設(shè)置
ControlNet 1:?
preprocessor: inpaint_global_harmonious,?
model: control_v11f1e_sd15_tile [a371b31b],
weight: 0.65, starting/ending: (0.35, 0.75),?

## 4. 推理后的其他結(jié)果




其他結(jié)果