30分钟零基础掌握ControlNet!绝对是你看过最好懂的控制网原理分析 |

主要描述自搭建遇到的不好解决的问题
准备:高性能电脑、境外云主机
环境:虽然SD使用venv但是由于需要使用huggingface所以PATH中的python版本必须为3.10.6
注册账号:huggingface 及token生成;git lts (下载带有大文件的git项目),在系统默认环境安装huggingface客户端:pip install huggingface-hub,注意不要在venv中安装不然无法注册,安装好后CMD中执行huggingface-cli login。
huggingface的缓存目录在~/.cache/huggingface下
所有需下载的git项目以及各种大文件由于防火墙的原因都可以采用境外云主机clone后打tar包再使用scp或python -m http.server的方式下至本地
stablediffusion由SDwebui套壳封装
SD地址:https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
SD封装项目在repositories下:
https://github.com/salesforce/BLIP.git , https://github.com/sczhou/CodeFormer.git , https://github.com/crowsonkb/k-diffusion.git , https://github.com/CompVis/taming-transformers.git , https://github.com/Stability-AI/stablediffusion.git
使用nvidia-smi命令查看系统适配的xformers,将webui-user改为以下
set PYTHON="C:\Users\44788\AppData\Local\Programs\Python\Python310\python.exe"
set COMMANDLINE_ARGS=--xformers
需要实时更新可增加git pull命令
执行webui-user时若未指定venv那么会自动在SD中建立,其中一些包使用豆瓣等常用源不好下载需手动安装:
wget https://github.com/openai/CLIP/archive/refs/heads/main.zip
wget https://github.com/TencentARC/GFPGAN/archive/refs/heads/master.zip
git clone https://github.com/facebookresearch/xformers.git
以上都需要自己手动安装requirement.txt及setup.py
插件:extensions文件夹
https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git
https://github.com/v8hid/infinite-zoom-automatic1111-webui.git
https://github.com/kohya-ss/sd-webui-additional-networks.git
https://github.com/Mikubill/sd-webui-controlnet.git
https://github.com/hnmr293/sd-webui-cutoff.git
https://github.com/hnmr293/sd-webui-llul.git
https://github.com/a2569875/stable-diffusion-webui-composable-lora.git
https://github.com/AlUlkesh/stable-diffusion-webui-images-browser.git
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
https://github.com/toriato/stable-diffusion-webui-wd14-tagger.git
https://github.com/Coyote-A/ultimate-upscale-for-automatic1111.git
bug:
在使用图生图的局部重绘(手涂蒙版)时,有概率会触发无法读取图片的问题,这个bug是由于先点击局部重绘时,系统将图片转为了一个中间格式,这时候再点击手涂蒙版,加载的图片并不是原图,而是中间格式,这样就会出现无法加载的问题,只需要X掉当前图片,重新选择图片的路径就可以。