Stable Diffusion本地部署
本地部署 二、安装 三、测试效果 3. 用英文翻译青梅竹马: 4 山水画,背景是山云,前景是江水,江水上有渔船,渔船上有老翁,船头站着鸬鹚,5min5. 调整参数增加steps,加大画幅, 来副山水,24 min 四、总结
一、环境准备 1. 良好的网络环境
网络很重要,安装会因为超时失败,我是失败了很多次才成功
2. 设备
,N 卡(我的是古早的1070)
二、安装 1 .clone 代码到本地
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
2. 安装环境 安装conda,也可以安装进入--webui目录创建conda 虚拟环境
# environment-wsl2.yaml是stable-diffusion-webui下文件
conda env create -p automatic -f D:\stable-diffusion-webui\environment-wsl2.yaml
激活conda 环境
conda activate automatic
安装依赖
pip install -r requirements.txt
安装其他依赖
# 这一步会安装 GFPGAN 等依赖
webui-user.bat
安装好后终端会显示服务以运行
Running on local URL: http://127.0.0.1:7860
直接访问域名,以上步骤安装顺利就说明成功了,我的界面如下:
三、测试效果 1. 黑猫,black cat,生成成功 10秒左右
2. 青梅竹马。10秒 用的是中文,画的就是拆词直译了,感觉跟文心一言有点一拼,哈哈哈
3. 用英文翻译青梅竹马: 意思达到了,就是有点丑
4 山水画,背景是山云,前景是江水,江水上有渔船,渔船上有老翁,船头站着鸬鹚,5min
: and as the , a river as the , with a boat on the river, an old man on the boat, and a on the bow of the boat.
整个画面很有意境,有云,山有远近,船很有意思,虽然小细节不太准,但是整个是很满意的
5. 调整参数增加steps,加大画幅,20min
白云,叠山,渔船,飞鸟,甚是有趣
6 来副山水,24 min
水墨画,背景是山云,前景是江水,江水很长,江水上有渔船,渔船上有老翁,船头站着鸬鹚
Ink : and as the , a long river as the , with a boat on the river, an old man on the boat, and a on the bow of the boat.
可能是描述的有问题,但是整体更加准确,船是外国船
7 中国画,背景是山云,前景是江水,江水很长,江水上有渔船,渔船上有老翁,船头站着鸬鹚 1h 6min
This is a with a of and and a of a long river. On the river, there is a boat with an man on board, and at the bow a .
这个效果就差很多,虽然有中国画的意境,但是还是差强人意
四、总结
部署很简单,但是依赖良好的网络,如果你的网络很通畅,基本可以解决80%的问题,工具弄好了,想要做好,就要研究玩法了!