Stable Diffusion本地部署

Stable Diffusion本地部署

  • 一、环境准备
    • 1. 良好的网络环境
    • 2. 设备
  • 二、安装Stable Diffusion
    • 1 .clone Stable Diffusion 代码到本地
    • 2. 安装python环境
  • 三、测试效果
    • 1. 黑猫,black cat,生成成功 10秒左右
    • 2. 青梅竹马。10秒
      • 用的是中文,画的就是拆词直译了,感觉跟文心一言有点一拼,哈哈哈
    • 3. 用英文翻译青梅竹马:Childhood sweethearts
      • 意思达到了,就是有点丑
    • 4 山水画,背景是山云,前景是江水,江水上有渔船,渔船上有老翁,船头站着鸬鹚,5min
    • 5. 调整参数增加steps,加大画幅,20min
    • 6 来副山水,24 min
  • 四、总结

一、环境准备

1. 良好的网络环境

网络很重要,安装会因为超时失败,我是失败了很多次才成功

2. 设备

Windows10,N 卡(我的是古早的1070)

二、安装Stable Diffusion

1 .clone Stable Diffusion 代码到本地

git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git

2. 安装python环境

  1. 安装conda,也可以安装miniconda
  2. 进入stable-diffusion-webui目录
  3. 创建conda 虚拟环境
# environment-wsl2.yaml是stable-diffusion-webui下文件
conda env create -p automatic -f D:\stable-diffusion-webui\environment-wsl2.yaml
  1. 激活conda 环境
conda activate automatic
  1. 安装依赖
pip install -r requirements.txt
  1. 安装其他依赖
# 这一步会安装  GFPGAN 等依赖
webui-user.bat
  1. 安装好后终端会显示服务以运行
Running on local URL:  http://127.0.0.1:7860
  1. 直接访问域名,以上步骤安装顺利就说明成功了,我的界面如下:

三、测试效果

1. 黑猫,black cat,生成成功 10秒左右

2. 青梅竹马。10秒

用的是中文,画的就是拆词直译了,感觉跟文心一言有点一拼,哈哈哈

3. 用英文翻译青梅竹马:Childhood sweethearts

意思达到了,就是有点丑


4 山水画,背景是山云,前景是江水,江水上有渔船,渔船上有老翁,船头站着鸬鹚,5min

Landscape painting: Mountain and clouds as the background, a river as the foreground, with a fishing boat on the river, an old man on the fishing boat, and a cormorant standing on the bow of the boat.

整个画面很有意境,有云,山有远近,船很有意思,虽然小细节不太准,但是整个是很满意的

5. 调整参数增加steps,加大画幅,20min

白云,叠山,渔船,飞鸟,甚是有趣

6 来副山水,24 min

水墨画,背景是山云,前景是江水,江水很长,江水上有渔船,渔船上有老翁,船头站着鸬鹚

Ink painting: Mountain and clouds as the background, a long river as the foreground, with a fishing boat on the river, an old man on the fishing boat, and a cormorant standing on the bow of the boat.
可能是描述的有问题,但是整体更加准确,船是外国船

7 中国画,背景是山云,前景是江水,江水很长,江水上有渔船,渔船上有老翁,船头站着鸬鹚 1h 6min
This is a traditional Chinese painting with a background of mountain and clouds and a foreground of a long river. On the river, there is a fishing boat with an elderly man on board, and at the bow stands a cormorant.
这个效果就差很多,虽然有中国画的意境,但是还是差强人意

四、总结

stable difussion 部署很简单,但是依赖良好的网络,如果你的网络很通畅,基本可以解决80%的问题,工具弄好了,想要做好,就要研究玩法了!

版权声明:本文为博主作者:大吉大利你吃鸡原创文章,版权归属原作者,如果侵权,请联系我们删除!

原文链接:https://blog.csdn.net/leoxow/article/details/129778150

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
扎眼的阳光的头像扎眼的阳光普通用户
上一篇 2024年1月16日
下一篇 2024年1月16日

相关推荐