一、前提条件
1、硬件条件
GPU:12G+,建议16G以上,还是尽量勾搭,好像现在最大32G,目前个人性价比24G有时长出售。
内存:16G以上,建议32G,也是越大越好。
硬盘:最好使用固态硬盘,还是尽量够大
2、软件要求:
python:3.10
cuda:11.8
二、文件下载
github:GitHub - AUTOMATIC1111/stable-diffusion-webui: Stable Diffusion web UI
整合好的版本:
链接: https://pan.baidu.com/s/1N0czN9ND_TeXpucKWYIrFg 提取码: t4de
选择文件:stable-diffusion-webui.zip
解压文件:
unzip stable-diffusion-webui.zip
三、开始安装stable-diffusion-webui
1、创建Python虚拟环境
我目前部署的是v1.9.3版本的Stable Diffusion,需要3.10.6版本的Python
//创建conda环境
conda create -n stable python=3.10.6
//激活conda环境
conda activate stable
2、安装python依赖包
pip install -r requirements.txt
四、启动服务
python launch.py --listen --xformers --enable-insecure-extension-access --theme dark --gradio-queue --port=8080
五、会出现一些错误
问题1:libGL.so.1: cannot open shared object file: No such file or directory
sudo apt-get update
sudo apt-get install -y libgl1-mesa-glx
问题2:
decoderF is not supported because:
xFormers wasn't build with CUDA support
attn_bias type is <class 'NoneType'>
operator wasn't built - see python -m xformers.info for more info
flshattF@0.0.0 is not supported because:
xFormers wasn't build with CUDA support
operator wasn't built - see python -m xformers.info for more info
tritonflashattF is not supported because:
xFormers wasn't build with CUDA support
operator wasn't built - see python -m xformers.info for more info
triton is not available
Only work on pre-MLIR triton for now
cutlassF is not supported because:
xFormers wasn't build with CUDA support
operator wasn't built - see python -m xformers.info for
解决方式:
pip uninstall xformers
pip install xformers