xxlong0/Wonder3D

windows installation and tiny cuda-nn guide worked for me !

kotaxyz opened this issue ยท 7 comments

conda create -n wonder3d python=3.8.10
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
conda install -c "nvidia/label/cuda-11.8.0" cuda-toolkit
pip install fire diffusers==0.19.3 transformers bitsandbytes accelerate gradio rembg segment_anything
pip install einops omegaconf pytorch-lightning==1.9.5 torch_efficient_distloss nerfacc==0.3.3 PyMCubes trimesh
pip install https://download.pytorch.org/whl/cu118/xformers-0.0.22.post4%2Bcu118-cp38-cp38-win_amd64.whl
pip install -U tensorboardX
pip install -U tensorboard

here is tiny cudann installation for windows

activate the conda environment for us it will be
conda activate wonder3d
then write these commands and make sure you change the microsoft visual studio version with the one you have ,you can search for the vcvars32.bat and change the directory i provided to the matching one and add x64 in the end like this

"\Program Files\Microsoft Visual Studio\2022\community\vc\Auxiliary\Build\vcvars32.bat" x64
after that write this command
pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch

now everything should work correctly

to use the gradio you will face an issue sam_vit_h_4b8939.pth is missing thats because the code cant create a folder and download the model to it to fix it you can do these steps

open the wonder3d folder that you cloned and create a file with name of
sam_pt
then download this model and add it there
https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth

you will get the link for the local running ,and you will get another error for gradio but its related with the repo and the dev is working on it

Screenshot (41)

I got tinycudann to build with Visual Studio 2019 and CUDA 11.8 otherwise following your guide to a T.

Also some additional requirements that I don't think were mentioned here:

  • streamlit

I also had to change the gradio.app to remove tool from a few arguements as done in the pull request here #34 .

Thank you all for all the hard work on this! Looking forward to trying it out!

Hello, I'm using 3060 , but it reports error: CUDA error: out of memory, did you change any parameter? And how long does it take you to generate a 3D model with a 3060ti?
Thank you all for all the hard work on this~

my error like this
1

hello @yangeer , i posted an issue regarding mesh extraction it seems one of the component is not compatible with windows ,also it takes so long to extract the views , so i installed wsl2 with ubuntu 22.04.2 and everything is now working with no issues , the step of extracting views of images took arround 10 min on windows but it take 30 sec on ubuntu , also the mesh extraction works just fine , from my tests 8gb vram is enough but you need 24 system ram and dedicate 14 gb ram to ubuntu and it will work fine , it take arround 6 min to extract the mesh

you can follow this guide to install wsl2 ubuntu with nvidia tool kit but make sure to install version ubuntu 22.04.2
https://www.youtube.com/watch?v=1HzYU2_t3yc

my error like this 1
@yangeer

its solved by setting worker num to something like 2

\instant-nsr-pl\datasets\ortho.py

def general_loader(self, dataset, batch_size):
    sampler = None
    return DataLoader(
        dataset, 
        num_workers=2,
        batch_size=batch_size,
        pin_memory=True,
        sampler=sampler
    )