一、部署Stable-Diffusion

1.打开阿里云官网 阿里云-计算,为了无法计算的价值 (aliyun.com)

2.搜索 函数计算 FC 并打开

3.点击侧边栏的应用并创建应用

4.点击人工智能并立即创建

5.到此创建完成

二、安装!After Detailer插件

1.打开管理地址后点击admin

2.点击编辑并修改,内存建议改大一点

不然后续的操作会出现报错memoryerror

3.在您管理工具的域名后添加 /terminal 如 admin.xxxxxxxxx.fc.devsapp.net/terminal

只需要执行一次

echo "export PYTHONPATH=/mnt/auto/sd/python" > /mnt/auto/sd/startup.sh

4.安装4个依赖:

export TMPDIR=/mnt/auto/sd/pip-cache

/opt/python3.10/bin/python3.10 -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

/opt/python3.10/bin/python3.10 -m pip install -t /mnt/auto/sd/python --cache-dir /mnt/auto/sd/pip-cache ultralytics

/opt/python3.10/bin/python3.10 -m pip install -t /mnt/auto/sd/python --cache-dir /mnt/auto/sd/pip-cache mediapipe

/opt/python3.10/bin/python3.10 -m pip install -t /mnt/auto/sd/python --cache-dir /mnt/auto/sd/pip-cache py-cpuinfo

/opt/python3.10/bin/python3.10 -m pip install -t /mnt/auto/sd/python --cache-dir /mnt/auto/sd/pip-cache protobuf

黄字是警告这里是安装成功了,第一个依赖大概等了20分钟,请耐心等待

把https://github.com/Bing-su/adetailer 下载下来放到插件目录

等待实例轮转后,重新进入 sd 页面

可以进入 sd 函数任意修改下环境变量(如 a=b),强制实例更新

三、展示