3DTopia / LGM

[ECCV 2024] LGM: Large Multi-View Gaussian Model for High-Resolution 3D Content Creation.

Home Page:https://me.kiui.moe/lgm/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

安装xformers后,提示torchaudio torchvision的版本不兼容了

luojin opened this issue · comments

非常喜欢这个项目,想要试跑一下效果,遇到问题,诚心请教。

安装xformers后,提示torchaudio torchvision的版本不兼容了
是不是前置安装torch指定的版本有问题?(pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu118)

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torchaudio 2.1.0+cu118 requires torch==2.1.0, but you have torch 2.2.0+cu118 which is incompatible.
torchvision 0.16.0+cu118 requires torch==2.1.0, but you have torch 2.2.0+cu118 which is incompatible.

commented

@luojin error里说你安装的是2.2,那就用2.2的audio和vision即可,代码对torch版本没有严格限制。

@ashawkey 感谢你的回复,这边做了一下尝试,把命令执行顺序互换一下就不会有这个问题了。

xformers的安装,会导致torch版本的变更,随之影响的是torchvision和torchaudio的版本。

调整后命令如下
pip install xformers --index-url https://download.pytorch.org/whl/cu118
pip install torch==2.2.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

希望可以帮到遇到同问题的你

@luojin 我安装了0.0.23版本的xformers,一开始 pip install xformers==0.0.23 -i https://download.pytorch.org/whl/cu118 ,在安装时,尝试安装 2.1.1 版本的torch,于是我觉得 0.0.23 的 xformers 应该适用于 2.1.0 的 torch ,于是为了避免安装 2.1.1 的 torch ,我就不安装依赖直接安装 xformers

pip install xformers==0.0.23 --no-deps -i https://download.pytorch.org/whl/cu118

然后在运行时就没有关于torch版本不匹配的警告了