Ubuntu 20.04 安装 Stable Diffusionn

步骤 1:安装 wget、git、Python3 和 Python3虚拟环境(如果已安装可忽略这步骤)

sudo apt install wget git python3 python3-venv

步骤 2:克隆 SD 项目到本地

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

步骤 3:进入 stable-diffusion-webui 根目录

cd stable-diffusion-webui		

步骤 4:执行命令运行 Stable Diffusionn

./webui.sh

错误汇总

错误 1、This script must not be launched as root, aborting…

在这里插入图片描述

解决:强制执行命令

./webui-sh -f

错误 2、Cannot activate python venv, aborting…

在这里插入图片描述

解决:依次执行以下命令

python3 -c 'import venv'
python3 -m venv venv/
./webui.sh -f

错误 3、Cannot locate TCMalloc (improves CPU memory usage)

在这里插入图片描述

解决:安装 libgoogle-perftools4libtcmalloc-minimal4 库。这两个库是 Google 开源的性能分析工具库,可以帮助开发者优化程序性能。

sudo apt-get install libgoogle-perftools4 libtcmalloc-minimal4 -y

错误 4、RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check

在这里插入图片描述

解决:添加命令行参数,跳过 Torch CUDA 测试

./webui.sh --skip-torch-cuda-test

错误 5、RuntimeError: “LayerNormKernelImpl” not implemented for ‘Half’

在这里插入图片描述

解决:添加命令行参数如下:

  • --skip-torch-cuda-test:跳过 Torch CUDA 测试(如果出现错误 1,则加上此参数,否则可以忽略此参数)
  • --precision full:使用完整的精度进行计算
  • --no-half:不使用半精度计算
./webui.sh --skip-torch-cuda-test --precision full --no-half
  • 9
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

一场雪ycx

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值