【运行环境】
Linux系统;python 3.10.6;3090显卡
【问题描述】
在使用命令
CUDA_VISIBLE_DEVICES=0 python launch.py --xformers
运行stable diffusion webui之后,能够正常打开界面和使用,但是显示如下信息
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Python 3.10.6 (main, Oct 24 2022, 16:07:47) [GCC 11.2.0]
Version: 1.10.1
Commit hash: <none>
Launching Web UI with arguments:
No module 'xformers'. Proceeding without it.
Loading weights [bfcaf07557] from /data0/wensheng/stable-diffusion-webui/models/Stable-diffusion/768-v-ema.ckpt
Running on local URL: http://127.0.0.1:7860
没有 xformers,而它是stable diffusion的加速模块,没有它的话运行会变慢,少量生成影响不大,但是对于大分辨率大批量生成,有没有速度就会差很多,所以必须给他整上
但是我的环境里是安装过的,使用pip list 可以查看到
xformer 1.0.1
xformers 0.0.29.dev913
那么问题出在哪儿呢
【解决方法】
网上有很多说法,有的很麻烦,有的不管用,最后发现其实非常简单,只要在命令里加上 --xformers就好了
CUDA_VISIBLE_DEVICES=0 python launch.py --xformers
再次运行就发现
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Python 3.10.6 (main, Oct 24 2022, 16:07:47) [GCC 11.2.0]
Version: 1.10.1
Commit hash: <none>
Launching Web UI with arguments: --xformers
Loading weights [bfcaf07557] from /data0/wensheng/stable-diffusion-webui/models/Stable-diffusion/768-v-ema.ckpt
Running on local URL: http://127.0.0.1:7860
不再提示 No module 'xformers'.
【效果对比】
单张图片生成,参数 Width 1284;Height 1168;Sampling steps 50
没有xformers的速度:ETA 1:10
有xformers的速度:ETA 0:34
完胜!