aarch64 arm64 部署 stable diffusion webui 笔记 【2】继续安装其他依赖 gfpgan

接上篇

aarch64 arm64 部署 stable diffusion webui 笔记 【1】准备 venv 安装pytorch 验证cuda_hkNaruto的博客-CSDN博客

编辑requirements_versions.txt,注释掉torch

aarch64 arm64 部署 stable diffusion webui 笔记 【2】继续安装其他依赖 gfpgan_第1张图片

启动webui.sh

(venv) [root@ceph3 stable-diffusion-webui]# useradd yeqiang
useradd:警告:此主目录已经存在。
不从 skel 目录里向其中复制任何文件。
(venv) [root@ceph3 stable-diffusion-webui]# chown yeqiang:yeqiang . -R
(venv) [root@ceph3 stable-diffusion-webui]# su yeqiang
(venv) [yeqiang@ceph3 stable-diffusion-webui]$ ./webui.sh 

故障,通过修改源码,添加打印发现强制验证了torch,torchvision

aarch64 arm64 部署 stable diffusion webui 笔记 【2】继续安装其他依赖 gfpgan_第2张图片

继续。。

切换用户重新配置环境变量

[yeqiang@ceph3 root]$ cd /home/yeqiang/stable-diffusion-webui/

[yeqiang@ceph3 stable-diffusion-webui]$ source venv/bin/activate
(venv) [yeqiang@ceph3 stable-diffusion-webui]$ export LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib:/usr/lib64:/usr/lib
 

手动安装torchvision

aarch64 arm64 部署 stable diffusion webui 笔记 【2】继续安装其他依赖 gfpgan_第3张图片

问题:pip会自动依赖安装torch==2.0.1,这个版本是CPU版本,Ctrl+C中断,选择手动编译安装torchvision

源码:

https://github.com/pytorch/vision/archive/refs/tags/v0.15.2.tar.gz

编译

[root@ceph3 ~]# su  yeqiang
[yeqiang@ceph3 root]$ cd ~
[yeqiang@ceph3 ~]$ cd stable-diffusion-webui/
[yeqiang@ceph3 stable-diffusion-webui]$ source venv/bin/activate

(venv) [yeqiang@ceph3 stable-diffusion-webui]$ cd ~
(venv) [yeqiang@ceph3 ~]$ tar -xf vision-0.15.2.tar.gz 
(venv) [yeqiang@ceph3 ~]$ cd vision-0.15.2/

(venv) [yeqiang@ceph3 vision-0.15.2]$ export LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib:/usr/lib64:/usr/lib

(venv) [yeqiang@ceph3 vision-0.15.2]$export PATH=/usr/local/cuda/bin:$PATH
(venv) [yeqiang@ceph3 vision-0.15.2]$ python3 setup.py build

(venv) [yeqiang@ceph3 vision-0.15.2]$ python3 setup.py install

网络故障处理(自己的环境问题,可不关注)

(venv) [yeqiang@ceph3 vision-0.15.2]$ python3 -m pip install Pillow==10.0.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

(venv) [yeqiang@ceph3 vision-0.15.2]$ python3 -m pip install requests==2.31.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

(venv) [yeqiang@ceph3 vision-0.15.2]$ python3 -m pip install numpy==1.26.0b1 -i https://pypi.tuna.tsinghua.edu.cn/simple

当前状态

aarch64 arm64 部署 stable diffusion webui 笔记 【2】继续安装其他依赖 gfpgan_第4张图片

启动webui.sh,开始自动安装,观察

(venv) [yeqiang@ceph3 vision-0.15.2]$ cd /home/yeqiang/stable-diffusion-webui/
(venv) [yeqiang@ceph3 stable-diffusion-webui]$ ./webui.sh 

离线安装(网络问题,可不关注)

(venv) [yeqiang@ceph3 stable-diffusion-webui]$ python3 -m pip install /home/yeqiang/stable-diffusion-webui-libs/*.whl

(venv) [yeqiang@ceph3 stable-diffusion-webui]$ python3 -m pip install file:///home/yeqiang/stable-diffusion-webui-libs/filterpy-1.4.5.zip

(venv) [yeqiang@ceph3 stable-diffusion-webui]$ python3 -m pip install file:///home/yeqiang/stable-diffusion-webui-libs/basicsr-1.4.2.tar.gz

(venv) [yeqiang@ceph3 stable-diffusion-webui]$ python3 -m pip install file:///home/yeqiang/stable-diffusion-webui-libs/filterpy-1.4.5.zip
Processing /home/yeqiang/stable-diffusion-webui-libs/filterpy-1.4.5.zip
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in ./venv/lib/python3.10/site-packages (from filterpy==1.4.5) (1.26.0b1)
Requirement already satisfied: scipy in ./venv/lib/python3.10/site-packages (from filterpy==1.4.5) (1.11.2)
Requirement already satisfied: matplotlib in ./venv/lib/python3.10/site-packages (from filterpy==1.4.5) (3.7.2)
Requirement already satisfied: packaging>=20.0 in ./venv/lib/python3.10/site-packages (from matplotlib->filterpy==1.4.5) (23.1)
Requirement already satisfied: fonttools>=4.22.0 in ./venv/lib/python3.10/site-packages (from matplotlib->filterpy==1.4.5) (4.42.1)
Requirement already satisfied: contourpy>=1.0.1 in ./venv/lib/python3.10/site-packages (from matplotlib->filterpy==1.4.5) (1.1.0)
Requirement already satisfied: python-dateutil>=2.7 in ./venv/lib/python3.10/site-packages (from matplotlib->filterpy==1.4.5) (2.8.2)
Requirement already satisfied: pyparsing<3.1,>=2.3.1 in ./venv/lib/python3.10/site-packages (from matplotlib->filterpy==1.4.5) (3.0.9)
Requirement already satisfied: cycler>=0.10 in ./venv/lib/python3.10/site-packages (from matplotlib->filterpy==1.4.5) (0.11.0)
Requirement already satisfied: kiwisolver>=1.0.1 in ./venv/lib/python3.10/site-packages (from matplotlib->filterpy==1.4.5) (1.4.5)
Requirement already satisfied: pillow>=6.2.0 in ./venv/lib/python3.10/site-packages (from matplotlib->filterpy==1.4.5) (10.0.0)
Requirement already satisfied: six>=1.5 in ./venv/lib/python3.10/site-packages (from python-dateutil>=2.7->matplotlib->filterpy==1.4.5) (1.16.0)
Building wheels for collected packages: filterpy
  Building wheel for filterpy (setup.py) ... done
  Created wheel for filterpy: filename=filterpy-1.4.5-py3-none-any.whl size=110334 sha256=ebe74d23306277b389d61d6a6450c026877f94faba646830e7bb6b4eced72562
  Stored in directory: /home/yeqiang/.cache/pip/wheels/33/87/3a/5541add2fe3261f47dc6b60b56b6c5356f09625c13e05234e8
Successfully built filterpy
Installing collected packages: filterpy
Successfully installed filterpy-1.4.5

[notice] A new release of pip is available: 23.0.1 -> 23.2.1
[notice] To update, run: pip install --upgrade pip

(venv) [yeqiang@ceph3 stable-diffusion-webui]$ python3 -m pip install /home/yeqiang/stable-diffusion-webui-libs/gfpan-libs/*

(venv) [yeqiang@ceph3 stable-diffusion-webui]$ python3 -m pip install file:///home/yeqiang/stable-diffusion-webui-libs/8d2447a2d918f8eba5a4a01463fd48e45126a379.zip

aarch64 arm64 部署 stable diffusion webui 笔记 【2】继续安装其他依赖 gfpgan_第5张图片

当前进度

(venv) [yeqiang@ceph3 stable-diffusion-webui]$ pip list
Package                 Version
----------------------- ------------------
absl-py                 1.4.0
addict                  2.4.0
basicsr                 1.4.2
cachetools              5.3.1
certifi                 2023.7.22
charset-normalizer      3.2.0
contourpy               1.1.0
cycler                  0.11.0
Cython                  3.0.2
facexlib                0.3.0
filelock                3.12.3
filterpy                1.4.5
fonttools               4.42.1
future                  0.18.3
gfpgan                  1.3.5
google-auth             2.22.0
google-auth-oauthlib    1.0.0
grpcio                  1.57.0
idna                    3.4
imageio                 2.31.3
importlib-metadata      6.8.0
Jinja2                  3.1.2
kiwisolver              1.4.5
lazy_loader             0.3
llvmlite                0.40.1
lmdb                    1.4.1
Markdown                3.4.4
MarkupSafe              2.1.3
matplotlib              3.7.2
mpmath                  1.3.0
networkx                3.1
numba                   0.57.1
numpy                   1.24.4
oauthlib                3.2.2
opencv-python           4.8.0.76
packaging               23.1
Pillow                  10.0.0
pip                     23.0.1
platformdirs            3.10.0
protobuf                4.23.4
pyasn1                  0.5.0
pyasn1-modules          0.3.0
pyparsing               3.0.9
python-dateutil         2.8.2
PyWavelets              1.4.1
PyYAML                  6.0.1
requests                2.31.0
requests-oauthlib       1.3.1
rsa                     4.9
scikit-image            0.21.0
scipy                   1.11.2
setuptools              65.5.0
six                     1.16.0
sympy                   1.12
tb-nightly              2.15.0a20230902
tensorboard-data-server 0.7.1
tifffile                2023.8.30
tomli                   2.0.1
torch                   2.0.0a0+gite9ebda2
torchvision             0.15.2a0
tqdm                    4.66.1
typing_extensions       4.7.1
urllib3                 1.26.16
Werkzeug                2.3.7
wheel                   0.41.2
yapf                    0.40.1
zipp                    3.16.2

[notice] A new release of pip is available: 23.0.1 -> 23.2.1
[notice] To update, run: pip install --upgrade pip
 

你可能感兴趣的:(stable,diffusion,ai,nvidia,stable,diffusion,pytorch,笔记)