【stable diffusion webui】No module ‘xformers‘. Proceeding without it.

【运行环境】

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

完胜!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值