TRELLIS 部署笔记
目录
依赖项安装
kaolin安装:
安装和运行报错解决
u2net.onnx 下载
解决方法,就是自行下载,然后拷贝到目录/root/.u2net
bash测试u2net:
报错GaussianRasterizationSettings.__new__() got an unexpected keyword argument 'kernel_size':
flexicubes报错:
dinov2下载超时问题解决
git地址:
GitHub - microsoft/TRELLIS: Official repo for paper "Structured 3D Latents for Scalable and Versatile 3D Generation".
依赖项安装
pip install git+https://github.com/EasternJournalist/utils3d.git@9a4eb15e4021b67b12c460c7057d642626897ec8
会自动更新numpy版本,numpy重装:
pip install numpy==1.26
kaolin安装:
Installation — NVIDIA Kaolin Library documentation
git clone https://github.com/NVIDIAGameWorks/kaolin.git
cd kaolin
pip install -r requirements.txt
python setup.py install
解决版本匹配问题:
pip install torch==2.5.0 torchvision==0.20.0 torchaudio==2.5.0 --index-url https://download.pytorch.org/whl/cu124 --index-url https://mirrors.ivolces.com/pypi/simple/pip install kaolin==0.17.0 -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.5.0_cu124.html
安装和运行报错解决
u2net.onnx 下载
'https://github.com/danielgatis/rembg/releases/download/v0.0.0/u2net.onnx' to file '/root/.u2net/u2net.onnx'
解决方法,就是自行下载,然后拷贝到目录/root/.u2net
bash测试u2net:
python -c"import rembg;import onnxruntime as ort;model_path = '/shared_disk/users/lbg/project/human_4d/trellis/TRELLIS-main/trellis/u2net.onnx';
local_model =ort.InferenceSession(model_path);
rembg_session = rembg.new_session(model=local_model)"
报错GaussianRasterizationSettings.__new__() got an unexpected keyword argument 'kernel_size':
这个版本没有kernel_size
解决方法,安装:
https://github.com/autonomousvision/mip-splatting/tree/main
flexicubes报错:
No module named 'trellis.representations.mesh.flexicubes.flexicubes'
解决方法:
下载拷贝:
GitHub - MaxtirError/FlexiCubes
dinov2下载超时问题解决
原来的代码
dinov2_model = torch.hub.load('facebookresearch/dinov2', name, pretrained=True)
解决方法:
dinov2_model = torch.hub.load('/root/.cache/torch/hub/facebookresearch_dinov2_main', name, pretrained=True,source='local')