ViewCrafter环境配置及问题解决

ViewCrafter代码仓库链接:

ViewCrafterhttps://github.com/Drexubery/ViewCrafter?tab=readme-ov-file

预备环境:


实验平台:AutoDL(云服务器租赁平台) + 4090 + Cuda 11.6 + Ubuntu 20.04 

环境配置:


首先克隆代码到本地:

git clone https://github.com/Drexubery/ViewCrafter.git
cd ViewCrafter

安装虚拟环境:

conda create -n viewcrafter python=3.9.16

source activate

conda activate viewcrafter

然后安装pytroch

参考网站:

Previous PyTorch Versions | PyTorch

pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu118

将requirements.txt 文件进行适当注释,防止与torch的版本冲突。(PS:这一步非常关键!!!)

有两个地方需要特别注意:

1. xformers的安装 

具体安装版本可以参考此博客:xformers版本与其依赖pytorch版本的对应关系_xformers对应torch版本-优快云博客

而我的torch版本是torch==2.0.0故安装的版本为0.0.19

pip install xformers==0.0.19

2. pytorch-lightning的安装

具体安装版本可以参考此网站:

Versioning Policy — PyTorch Lightning 2.5.1rc2 documentation

pip install pytorch-lightning==2.0

接着安装 PyTorch3D:

具体安装版本可以参考此网站:

conda install https://anaconda.org/pytorch3d/pytorch3d/0.7.5/download/linux-64/pytorch3d-0.7.5-py39_cu118_pyt200.tar.bz2

Files | Anaconda.org

最后下载Dust3R预训练模型 + ViewCrafter的模型权重model.ckpt:

mkdir -p checkpoints/
wget https://download.europe.naverlabs.com/ComputerVision/DUSt3R/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth -P checkpoints/

wget https://huggingface.co/Drexubery/ViewCrafter_25/resolve/main/model.ckpt -P checkpoints/

实验测试:

运行代码 + 运行截图

sh run.sh

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值