主要参考
原作者
的博文:AI生成可扫码图像 — 新 ControlNet 模型展示
光照生成模型C站说明:https://civitai.com/models/80536/lighting-based-picture-control-controlnet
扩展阅读: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
手把手教程:
转载的视频:https://www.bilibili.com/video/BV1yN411S7Tx
注意:测试里效果差异来自 SD基础模型
和VAE
DIY步骤
需要先安装好stable-diffusion-webui 以及controlnet插件,以及基础模型
下图为实际生成过程,中途生成也有失败,需要仔细检查参数
,具体见截图
1. 在线生成二维码(可自己百度)
- https://cli.im/url
本博文
用的是:https://qr.io/
2.1 controlnet相关模型下载
controlnet的
ui安装
见:https://github.com/Mikubill/sd-webui-controlnet
光照控制模型:control_v1p_sd15_brightness.safetensors
control_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
也可以使用其他动漫vae ,效果略有差异
默认的 anything-v4.5-pruned.vae.pt 颜色会差一点
3 参数设置
3.1 总参数
base Model: anything-v4.5-pruned (可以自己选)
·重要: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)”
上传生成的图片获取生成信息
3.2 controlnet -brightness模型的设置
model: control_v1p_sd15_brightness [5f6aa6ed], weight: 0.35, starting/ending: (0, 1)
3.3 controlnet -tile 模型的设置
ControlNet 1
:
preprocessor: inpaint_global_harmonious,
model: control_v11f1e_sd15_tile [a371b31b],
weight: 0.65, starting/ending: (0.35, 0.75),