1、下载Anaconda
wget https://repo.anaconda.com/archive/Anaconda3-2023.03-1-Linux-x86_64.sh
如果没有wget则可以通过以下命令安装yum install wget -y
2、安装Anaconda
增加执行权限: chmod +x Anaconda3-2023.03-1-Linux-x86_64.sh
开始执行:./Anaconda3-2023.03-1-Linux-x86_64.sh
3 创建虚拟环境:conda create -n sd python=3.10.6
切换到SD:conda activate sd
conda install git
1、下载代码stable-diffusion-webui
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip install torch==2.0.0+cu117 torchvision==0.15.1+cu117 torchaudio==2.0.1 torchtext==0.15.1 torchdata==0.6.0 --index-url https://download.pytorch.org/whl/cu117
pip install --upgrade setuptools
pip install cython
pip install opencv-python
pip install -r requirements_versions.txt
python -m pip config set global.index-url https://mirrors.aliyun.com/pypi/simple
pip install -r requirements_versions.txt
pip install -r requirements.txt
2、启动webu.sh
切换到 stable-diffusion-webui目录
方法一: 运行 bash webui.sh