Ubuntu 20.04 安装 Stable Diffusionn

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

apl 复制代码
sudo apt install wget git python3 python3-venv

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

apl 复制代码
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui

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

apl 复制代码
cd stable-diffusion-webui		

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

apl 复制代码
./webui.sh

错误汇总

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

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

apl 复制代码
sudo apt-get install libgoogle-perftools4 libtcmalloc-minimal4 -y

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

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

apl 复制代码
./webui.sh --skip-torch-cuda-test

错误 3、RuntimeError: "LayerNormKernelImpl" not implemented for 'Half'

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

  • --skip-torch-cuda-test:跳过 Torch CUDA 测试(如果出现错误 1,则加上此参数,否则可以忽略此参数)
  • --precision full:使用完整的精度进行计算
  • --no-half:不使用半精度计算
apl 复制代码
./webui.sh --skip-torch-cuda-test --precision full --no-half
相关推荐
冷崖28 分钟前
定时器的学习(二)
linux·c++·学习
馨谙1 小时前
chage -d 0 强制密码修改的完整流程
linux·运维
爱技术的小伙子1 小时前
【Linux运维】 Prometheus + Grafana + Alertmanager 监控系统部署指南(CentOS & Ubuntu 通用版)
linux·运维·prometheus
Zach_yuan1 小时前
Linux编辑器vim
linux·编辑器·vim
hweiyu002 小时前
Linux运维实战:云原生设计与实施Docker&K8S(视频教程)
linux·运维·云原生
海棠蚀omo2 小时前
Linux操作系统-命令行参数及环境变量
linux·操作系统
小白不想白a3 小时前
【shell】每日shell练习(系统用户安全审计/系统日志错误分析)
linux·运维·云原生
码猫Mrr3 小时前
创维E900V22D刷入armbian hdmi开机花屏和网络无法使用 解决方式【亲测】
linux·armbian·e900v22d
Cx330❀3 小时前
《Linux基础入门指令(二)》:从零开始理解Linux系统
linux·运维·服务器·网络·经验分享
leafff1234 小时前
Stable Diffusion在进行AI 创作时对算力的要求
人工智能·stable diffusion