Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting Up Trellis on Windows #3

Open
wes-kay opened this issue Dec 6, 2024 · 23 comments
Open

Setting Up Trellis on Windows #3

wes-kay opened this issue Dec 6, 2024 · 23 comments

Comments

@wes-kay
Copy link

wes-kay commented Dec 6, 2024

I fully understand this is not an issue, just making a thread in the event that someone has a working setup with windows, the current dependencies are failing on the Microsoft C++ runtime on WSL and all the other ways I've tried to set Trellis up with.

This is above my pay grade, so if anyone wants to update with their working steps, I would appreciate it.

@bezo97
Copy link

bezo97 commented Dec 6, 2024

I've spent a few hours trying to make the project run on WSL and it works.
Here's everything that worked for me beyond following the instructions:

  • I used Ubuntu 24.04.1 LTS
  • Must install gcc-11 and g++-11 and then symlink both with the below commands. You need to hunt these down from archives if you're also on the latest ubuntu. This step is needed to build the diffoctreerast project. It won't work with the latest gcc versions because gcc-11 is the maximum version that cuda 11.8 supports.
    • sudo ln -s /usr/bin/gcc-11 /usr/bin/gcc
    • sudo ln -s /usr/bin/g++-11 /usr/bin/g++
  • missing GLIBCXX_3.4.32 caused a runtime error in diff_gaussian_rasterization - I solved this by creating a 3rd symlink: ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ${CONDA_PREFIX}/lib/libstdc++.so.6
    The rest should work as in the instructions.

Image

Tagging @JeffreyXiang to confirm it runs in WSL with a bit of fiddling.

@sicxu
Copy link
Contributor

sicxu commented Dec 7, 2024

Another solution to run the inference code on Windows.

git clone --recurse-submodules https://github.com/microsoft/TRELLIS.git
cd TRELLIS
conda create -n trellis python=3.10
conda activate trellis 

pip install torch==2.5.1 torchvision --index-url=https://download.pytorch.org/whl/cu124
pip install xformers==0.0.28.post3 --index-url=https://download.pytorch.org/whl/cu124
pip install pillow imageio imageio-ffmpeg tqdm easydict opencv-python-headless scipy ninja rembg onnxruntime trimesh xatlas pyvista pymeshfix igraph transformers
pip install git+https://github.com/EasternJournalist/utils3d.git@9a4eb15e4021b67b12c460c7057d642626897ec8
pip install https://github.com/bdashore3/flash-attention/releases/download/v2.7.1.post1/flash_attn-2.7.1.post1+cu124torch2.5.1cxx11abiFALSE-cp310-cp310-win_amd64.whl
pip install kaolin -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.5.1_cu124.html

git clone https://github.com/NVlabs/nvdiffrast.git ./tmp/extensions/nvdiffrast
pip install ./tmp/extensions/nvdiffrast

git clone --recurse-submodules https://github.com/JeffreyXiang/diffoctreerast.git ./tmp/extensions/diffoctreerast
pip install ./tmp/extensions/diffoctreerast

git clone https://github.com/autonomousvision/mip-splatting.git ./tmp/extensions/mip-splatting
pip install ./tmp/extensions/mip-splatting/submodules/diff-gaussian-rasterization/

cp -r ./extensions/vox2seq ./tmp/extensions/vox2seq
pip install ./tmp/extensions/vox2seq

pip install spconv-cu120
pip install gradio==4.44.1 gradio_litmodel3d==0.0.1

set ATTN_BACKEND=flash-attn
set SPCONV_ALGO=native
python ./app.py

Originally posted by @iiiytn1k in #8

@sicxu sicxu changed the title Guidance Needed: Setting Up Trellis on Windows (WSL Compatibility Issue) Setting Up Trellis on Windows Dec 7, 2024
@sicxu
Copy link
Contributor

sicxu commented Dec 7, 2024

Another example to run the inference code on Windows. #10

@SoftologyPro
Copy link

Can anyone share a WHL for diffoctreerast?
I am having issues getting past that point in the installs.

@iiiytn1k
Copy link

iiiytn1k commented Dec 7, 2024

@SoftologyPro https://github.com/iiiytn1k/sd-webui-some-stuff/releases/download/diffoctreerast/diffoctreerast-0.0.0-cp310-cp310-win_amd64.whl

@SoftologyPro
Copy link

@SoftologyPro https://github.com/iiiytn1k/sd-webui-some-stuff/releases/download/diffoctreerast/diffoctreerast-0.0.0-cp310-cp310-win_amd64.whl

Thanks! That works. Any chance you have a WHL for mip-splatting.git too? That has the same build errors here (says no torch when torch is installed). The rest of the packages install fine.

@iiiytn1k
Copy link

iiiytn1k commented Dec 7, 2024

@SoftologyPro There are wheels that built from source https://github.com/iiiytn1k/sd-webui-some-stuff/releases/tag/diffoctreerast

@VladRez
Copy link

VladRez commented Dec 7, 2024

I successfully got Trellis working on Windows 10 without requiring WSL, using Anaconda and CUDA compilation tools release 12.4.

The following command sequence replicates the setup.sh script in an Anaconda PowerShell prompt, using the parameters --new-env --basic --xformers --flash-attn --diffoctreerast --spconv --mipgaussian --kaolin --nvdiffrast.

conda create -n trellis python=3.10 -y
conda activate trellis
conda install pytorch==2.5.0 torchvision==0.20.0 pytorch-cuda=12.4 -c pytorch -c nvidia -y
pip install pillow imageio imageio-ffmpeg tqdm easydict opencv-python-headless scipy ninja rembg onnxruntime trimesh xatlas pyvista pymeshfix igraph transformers
pip install git+https://github.com/EasternJournalist/utils3d.git@9a4eb15e4021b67b12c460c7057d642626897ec8
pip install xformers==0.0.28.post2 --index-url https://download.pytorch.org/whl/cu124
# this will take 2hr+ to compile
pip install flash-attn
New-Item -ItemType Directory -Force -Path C:\tmp\extensions
git clone --recurse-submodules https://github.com/JeffreyXiang/diffoctreerast.git C:\tmp\extensions\diffoctreerast
pip install C:\tmp\extensions\diffoctreerast
pip install spconv-cu120
git clone https://github.com/autonomousvision/mip-splatting.git C:\tmp\extensions\mip-splatting
pip install C:\tmp\extensions\mip-splatting\submodules\diff-gaussian-rasterization\
pip install kaolin -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.4.0_cu121.html
git clone https://github.com/NVlabs/nvdiffrast.git C:\tmp\extensions\nvdiffrast
pip install C:\tmp\extensions\nvdiffrast

In a DataSpell notebook I was able to generate
Image
Image

@dexb1e
Copy link

dexb1e commented Dec 7, 2024

I've spent a few hours trying to make the project run on WSL and it works. Here's everything that worked for me beyond following the instructions:

  • I used Ubuntu 24.04.1 LTS

  • Must install gcc-11 and g++-11 and then symlink both with the below commands. You need to hunt these down from archives if you're also on the latest ubuntu. This step is needed to build the diffoctreerast project. It won't work with the latest gcc versions because gcc-11 is the maximum version that cuda 11.8 supports.

    • sudo ln -s /usr/bin/gcc-11 /usr/bin/gcc
    • sudo ln -s /usr/bin/g++-11 /usr/bin/g++
  • missing GLIBCXX_3.4.32 caused a runtime error in diff_gaussian_rasterization - I solved this by creating a 3rd symlink: ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ${CONDA_PREFIX}/lib/libstdc++.so.6
    The rest should work as in the instructions.

Image

Tagging @JeffreyXiang to confirm it runs in WSL with a bit of fiddling.

@bezo97 I managed to run the app.py demo with the following commands on WSL2 version 2.3.26 running Ubuntu 24.04.1 with Miniconda installed:

git clone --recurse-submodules https://github.com/microsoft/TRELLIS.git
cd TRELLIS
conda create -n trellis python=3.10
conda activate trellis
conda install cuda -c nvidia/label/cuda-11.8.0
conda install pytorch=2.4.0 torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
conda install gxx_linux-64
./setup.sh --basic --xformers --flash-attn --diffoctreerast --spconv --vox2seq --mipgaussian --kaolin --nvdiffrast --demo

PyTorch was pinned to 2.4.0 since it was the maximum version supported in this repo's setup.sh at the moment of writing. I added the "conda install gxx_linux-64" command since at some point during installation it failed to find the CPP compiler in the Conda environment. It installed GCC 11 confined to the Conda environment, so perhaps that would solve the issues you had with the GCC compiler version without needing to change the default system-wide version. I did not run into the GLIBCXX error.

@SoftologyPro
Copy link

SoftologyPro commented Dec 7, 2024

Here are my install.bat and run.bat for installing on Windows 11 without WSL and/or Conda required. It does need CUDA 12 and will not work with the IoT LTSC version of Windows 11.

Create an empty directory. Save the 2 batch files into it. Command line into the directory. Run install.bat then run.bat.

The only issue this has is it only works on a 4090 GPU? On a 3090 it gives an out of memory error. Which is not correct as there is plenty of VRAM and physical RAM free. It installs fine and the UI starts fine. But when you click Generate it will OOM if you do not have a 4090. I have never seen any AI/ML script that works only on a 4090 and not a 3090. If anyone has any ideas as to why this happens, please let me know. Maybe the WHLs have some 4090 only compatible code?

install.bat

@echo off

cd
echo *** Deleting TRELLIS directory if it exists
if exist TRELLIS\. rd /S /Q TRELLIS

echo *** Cloning TRELLIS repository
git clone --recurse-submodules https://github.com/microsoft/TRELLIS.git
cd TRELLIS

echo *** Creating venv
python -m venv venv
call venv\scripts\activate.bat

echo *** Upgrading pip
python -m pip install --upgrade pip

echo *** Installing requirements
pip install torch==2.5.1 torchvision --index-url=https://download.pytorch.org/whl/cu124
pip install xformers==0.0.28.post3 --index-url=https://download.pytorch.org/whl/cu124
pip install pillow imageio imageio-ffmpeg tqdm easydict opencv-python-headless scipy ninja rembg onnxruntime trimesh xatlas pyvista pymeshfix igraph transformers
pip install git+https://github.com/EasternJournalist/utils3d.git@9a4eb15e4021b67b12c460c7057d642626897ec8
pip install https://github.com/bdashore3/flash-attention/releases/download/v2.7.1.post1/flash_attn-2.7.1.post1+cu124torch2.5.1cxx11abiFALSE-cp310-cp310-win_amd64.whl
pip install kaolin -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.5.1_cu124.html
pip install https://github.com/iiiytn1k/sd-webui-some-stuff/releases/download/diffoctreerast/nvdiffrast-0.3.3-py3-none-any.whl
pip install https://github.com/iiiytn1k/sd-webui-some-stuff/releases/download/diffoctreerast/diffoctreerast-0.0.0-cp310-cp310-win_amd64.whl
pip install https://github.com/iiiytn1k/sd-webui-some-stuff/releases/download/diffoctreerast/diff_gaussian_rasterization-0.0.0-cp310-cp310-win_amd64.whl
pip install https://github.com/iiiytn1k/sd-webui-some-stuff/releases/download/diffoctreerast/vox2seq-0.0.0-cp310-cp310-win_amd64.whl
pip install spconv-cu120
pip install gradio==4.44.1 gradio_litmodel3d==0.0.1

call venv\scripts\deactivate.bat
cd..

echo *** Finished TRELLIS install
echo.
echo *** Scroll up and check for errors.  Do not assume it worked.
pause

run.bat

@echo off
cd TRELLIS
call venv\scripts\activate.bat
set ATTN_BACKEND=flash-attn
set SPCONV_ALGO=native
python app.py
call venv\scripts\deactivate.bat
cd..

@OneOnlineShow
Copy link

Here are my install.bat and run.bat for installing on Windows without WSL and/or Conda required. It does need CUDA 12.

ERROR: flash_attn-2.7.1.post1+cu124torch2.5.1cxx11abiFALSE-cp310-cp310-win_amd64.whl is not a supported wheel on this platform.
ERROR: diffoctreerast-0.0.0-cp310-cp310-win_amd64.whl is not a supported wheel on this platform.
ERROR: diff_gaussian_rasterization-0.0.0-cp310-cp310-win_amd64.whl is not a supported wheel on this platform.
ERROR: vox2seq-0.0.0-cp310-cp310-win_amd64.whl is not a supported wheel on this platform.

Windows 11 IoT LTSC.

@SoftologyPro
Copy link

Here are my install.bat and run.bat for installing on Windows without WSL and/or Conda required. It does need CUDA 12.

ERROR: flash_attn-2.7.1.post1+cu124torch2.5.1cxx11abiFALSE-cp310-cp310-win_amd64.whl is not a supported wheel on this platform. ERROR: diffoctreerast-0.0.0-cp310-cp310-win_amd64.whl is not a supported wheel on this platform. ERROR: diff_gaussian_rasterization-0.0.0-cp310-cp310-win_amd64.whl is not a supported wheel on this platform. ERROR: vox2seq-0.0.0-cp310-cp310-win_amd64.whl is not a supported wheel on this platform.

Windows 11 IoT LTSC.

OK, I added a note saying it will not work with IoT LTSC.

@OneOnlineShow
Copy link

OneOnlineShow commented Dec 8, 2024

Finally the only working 1 click solution, Microsoft has something to learn from this guy:
https://github.com/sdbds/TRELLIS-for-windows/
(updated on 12/08/24)

The end user is not interested in installing a ton of useless software or even a whole OS to run something, nowadays you either make a 1 click solution or go to the bottom with all your 1% of people who ran it under windows without problems. I have no idea how this took only 2 days of 1 person's free time when the entire Microsoft staff couldn't do it. No hate, just a statement of facts.

@astralmedia
Copy link

Has anyone been able to get spconv-cu120 working on Win? Got passed everything else but keep getting hung up there.

ERROR: No matching distribution found for spconv-cu120

@o-l-l-i
Copy link

o-l-l-i commented Dec 9, 2024

Has anyone been able to get spconv-cu120 working on Win? Got passed everything else but keep getting hung up there.

ERROR: No matching distribution found for spconv-cu120

I think this might have something to do with the Python version; I made venv with Python 3.13, and I got the same error. Then I made the venv again with earlier Python version (3.11.8), now this allows me to get that spconv installed (pip install spconv-cu120) but diffoctreerast, diff_gaussian_rasterization and vox2seq complain in similar way (...is not a supported wheel on this platform.)

@DiamondGlassDrill
Copy link

DiamondGlassDrill commented Dec 11, 2024

For those on Windows with working Trellis, what GPU do you have? As I get out of memory issues from diff_gaussian_rasterization
I do have a 3090

Someone of you experienced the same error?

diff_gaussian_rasterization\__init__.py", line 94, in forward
    num_rendered, color, radii, geomBuffer, binningBuffer, imgBuffer = _C.rasterize_gaussians(*args)
RuntimeError: CUDA out of memory. Tried to allocate 780.06 GiB. GPU 0 has a total capacity of 24.00 GiB of which 16.84 GiB is free. Of the allocated memory 5.52 GiB is allocated by PyTorch, and 309.87 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation.  See documentation for Memory Management  (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)

@DiamondGlassDrill
Copy link

For those on Windows with working Trellis, what GPU do you have? As I get out of memory issues from diff_gaussian_rasterization I do have a 3090

Someone of you experienced the same error?

diff_gaussian_rasterization\__init__.py", line 94, in forward
    num_rendered, color, radii, geomBuffer, binningBuffer, imgBuffer = _C.rasterize_gaussians(*args)
RuntimeError: CUDA out of memory. Tried to allocate 780.06 GiB. GPU 0 has a total capacity of 24.00 GiB of which 16.84 GiB is free. Of the allocated memory 5.52 GiB is allocated by PyTorch, and 309.87 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation.  See documentation for Memory Management  (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)

Solved it with manually reinstalling thus making it work for 3090 as well:

set TORCH_CUDA_ARCH_LIST=6.0 7.0 7.5 8.0 8.6+PTX
git clone https://github.com/autonomousvision/mip-splatting.git /tmp/extensions/mip-splatting
pip install /tmp/extensions/mip-splatting/submodules/diff-gaussian-rasterization/

@wes-kay
Copy link
Author

wes-kay commented Dec 11, 2024

For those on Windows with working Trellis, what GPU do you have? As I get out of memory issues from diff_gaussian_rasterization I do have a 3090

Someone of you experienced the same error?

diff_gaussian_rasterization\__init__.py", line 94, in forward
    num_rendered, color, radii, geomBuffer, binningBuffer, imgBuffer = _C.rasterize_gaussians(*args)
RuntimeError: CUDA out of memory. Tried to allocate 780.06 GiB. GPU 0 has a total capacity of 24.00 GiB of which 16.84 GiB is free. Of the allocated memory 5.52 GiB is allocated by PyTorch, and 309.87 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation.  See documentation for Memory Management  (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)

Solved it with manually reinstalling thus making it work for 3090 as well:

set TORCH_CUDA_ARCH_LIST=6.0 7.0 7.5 8.0 8.6+PTX
git clone https://github.com/autonomousvision/mip-splatting.git /tmp/extensions/mip-splatting
pip install /tmp/extensions/mip-splatting/submodules/diff-gaussian-rasterization/

Do you mind me asking what are your average generation times with the 3090 thinking about picking one up.

@DiamondGlassDrill
Copy link

DiamondGlassDrill commented Dec 11, 2024 via email

@doraemoner
Copy link

from cumm.core_cc import tensorview_bind
ImportError: DLL load failed while importing core_cc: The specified module could not be found.

Does anyone know how to fix this problem?

@realstevewarner
Copy link

The single-click install didn't work. Here's what did:

System: Windows 10
Graphics Card: 4090
Python 3.10
Cuda Toolkit 12.4

In Windows Explorer, make a folder for where you want Trellis to live. I called mine "Trellis"
Go into that folder and open a Command Prompt there. If you don't know how to do this, open any command prompt and manually navigate to your folder. Use ChatGPT if you need more help.

Once in the folder, download the repo from git using the following command:
git clone --recurse-submodules https://github.com/microsoft/TRELLIS.git

Set up a Conda environment. I have MiniConda installed. Anaconda will work as well.

In your Command Prompt, paste in these commands one after the other:
conda create -n trellis python=3.10 -y
conda activate trellis

My system had trouble seeing the CUDA toolkit so I had to force the path.
I pasted these into my Command Prompt:
set CUDA_HOME=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4
set PATH=%CUDA_HOME%\bin;%PATH%

From here, you're following the process outlined by Sicxu. Copy each command below and paste it into your command prompt.

pip install torch==2.5.1 torchvision --index-url=https://download.pytorch.org/whl/cu124
pip install xformers==0.0.28.post3 --index-url=https://download.pytorch.org/whl/cu124
pip install pillow imageio imageio-ffmpeg tqdm easydict opencv-python-headless scipy ninja rembg onnxruntime trimesh xatlas pyvista pymeshfix igraph transformers
pip install git+https://github.com/EasternJournalist/utils3d.git@9a4eb15e4021b67b12c460c7057d642626897ec8
pip install https://github.com/bdashore3/flash-attention/releases/download/v2.7.1.post1/flash_attn-2.7.1.post1+cu124torch2.5.1cxx11abiFALSE-cp310-cp310-win_amd64.whl
pip install kaolin -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.5.1_cu124.html

git clone https://github.com/NVlabs/nvdiffrast.git ./tmp/extensions/nvdiffrast
pip install ./tmp/extensions/nvdiffrast

git clone --recurse-submodules https://github.com/JeffreyXiang/diffoctreerast.git ./tmp/extensions/diffoctreerast
pip install ./tmp/extensions/diffoctreerast

git clone https://github.com/autonomousvision/mip-splatting.git ./tmp/extensions/mip-splatting
pip install ./tmp/extensions/mip-splatting/submodules/diff-gaussian-rasterization/

xcopy .\extensions\vox2seq .\tmp\extensions\vox2seq /E /I
pip install ./tmp/extensions/vox2seq

pip install spconv-cu120
pip install gradio==4.44.1 gradio_litmodel3d==0.0.1

Each of these should install without error. If you get an error, copy it into ChatGPT and see if you can resolve it.
Once everything is installed without error, you can set up a .bat file to launch the Gradio app.

Copy the following text and paste it into a new text file.

@echo off
call conda activate trellis
set CUDA_HOME=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4
set PATH=%CUDA_HOME%\bin;%PATH%
set ATTN_BACKEND=flash-attn
set SPCONV_ALGO=native
python ./app.py
pause

Save the text file and rename it to RunTrellis.bat

From here, you should be able to double click the bat file. On first run, it will download the necessary models. You may get a message about xformers. I ignored this and everything still ran fine.

You'll end up with a web address. Copy that and paste it into your browser. You should get the Gradio app interface and be able to drag some of the sample images in to test it.
Image

@PeterSmoofwah
Copy link

The single-click install didn't work. Here's what did:

System: Windows 10 Graphics Card: 4090 Python 3.10 Cuda Toolkit 12.4

In Windows Explorer, make a folder for where you want Trellis to live. I called mine "Trellis" Go into that folder and open a Command Prompt there. If you don't know how to do this, open any command prompt and manually navigate to your folder. Use ChatGPT if you need more help.

Once in the folder, download the repo from git using the following command: git clone --recurse-submodules https://github.com/microsoft/TRELLIS.git

Set up a Conda environment. I have MiniConda installed. Anaconda will work as well.

In your Command Prompt, paste in these commands one after the other: conda create -n trellis python=3.10 -y conda activate trellis

My system had trouble seeing the CUDA toolkit so I had to force the path. I pasted these into my Command Prompt: set CUDA_HOME=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4 set PATH=%CUDA_HOME%\bin;%PATH%

From here, you're following the process outlined by Sicxu. Copy each command below and paste it into your command prompt.

pip install torch==2.5.1 torchvision --index-url=https://download.pytorch.org/whl/cu124 pip install xformers==0.0.28.post3 --index-url=https://download.pytorch.org/whl/cu124 pip install pillow imageio imageio-ffmpeg tqdm easydict opencv-python-headless scipy ninja rembg onnxruntime trimesh xatlas pyvista pymeshfix igraph transformers pip install git+https://github.com/EasternJournalist/utils3d.git@9a4eb15e4021b67b12c460c7057d642626897ec8 pip install https://github.com/bdashore3/flash-attention/releases/download/v2.7.1.post1/flash_attn-2.7.1.post1+cu124torch2.5.1cxx11abiFALSE-cp310-cp310-win_amd64.whl pip install kaolin -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.5.1_cu124.html

git clone https://github.com/NVlabs/nvdiffrast.git ./tmp/extensions/nvdiffrast pip install ./tmp/extensions/nvdiffrast

git clone --recurse-submodules https://github.com/JeffreyXiang/diffoctreerast.git ./tmp/extensions/diffoctreerast pip install ./tmp/extensions/diffoctreerast

git clone https://github.com/autonomousvision/mip-splatting.git ./tmp/extensions/mip-splatting pip install ./tmp/extensions/mip-splatting/submodules/diff-gaussian-rasterization/

xcopy .\extensions\vox2seq .\tmp\extensions\vox2seq /E /I pip install ./tmp/extensions/vox2seq

pip install spconv-cu120 pip install gradio==4.44.1 gradio_litmodel3d==0.0.1

Each of these should install without error. If you get an error, copy it into ChatGPT and see if you can resolve it. Once everything is installed without error, you can set up a .bat file to launch the Gradio app.

Copy the following text and paste it into a new text file.

@echo off call conda activate trellis set CUDA_HOME=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4 set PATH=%CUDA_HOME%\bin;%PATH% set ATTN_BACKEND=flash-attn set SPCONV_ALGO=native python ./app.py pause

Save the text file and rename it to RunTrellis.bat

From here, you should be able to double click the bat file. On first run, it will download the necessary models. You may get a message about xformers. I ignored this and everything still ran fine.

You'll end up with a web address. Copy that and paste it into your browser. You should get the Gradio app interface and be able to drag some of the sample images in to test it. Image

This was the fix for me after trying literally every other thing on the internet but xcopy didn't work for me had to manually drag the extension to the tmp folder and then the install command worked

@Eydahn8
Copy link

Eydahn8 commented Dec 14, 2024

The single-click install didn't work. Here's what did:

System: Windows 10 Graphics Card: 4090 Python 3.10 Cuda Toolkit 12.4

In Windows Explorer, make a folder for where you want Trellis to live. I called mine "Trellis" Go into that folder and open a Command Prompt there. If you don't know how to do this, open any command prompt and manually navigate to your folder. Use ChatGPT if you need more help.

Once in the folder, download the repo from git using the following command: git clone --recurse-submodules https://github.com/microsoft/TRELLIS.git

Set up a Conda environment. I have MiniConda installed. Anaconda will work as well.

In your Command Prompt, paste in these commands one after the other: conda create -n trellis python=3.10 -y conda activate trellis

My system had trouble seeing the CUDA toolkit so I had to force the path. I pasted these into my Command Prompt: set CUDA_HOME=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4 set PATH=%CUDA_HOME%\bin;%PATH%

From here, you're following the process outlined by Sicxu. Copy each command below and paste it into your command prompt.

pip install torch==2.5.1 torchvision --index-url=https://download.pytorch.org/whl/cu124 pip install xformers==0.0.28.post3 --index-url=https://download.pytorch.org/whl/cu124 pip install pillow imageio imageio-ffmpeg tqdm easydict opencv-python-headless scipy ninja rembg onnxruntime trimesh xatlas pyvista pymeshfix igraph transformers pip install git+https://github.com/EasternJournalist/utils3d.git@9a4eb15e4021b67b12c460c7057d642626897ec8 pip install https://github.com/bdashore3/flash-attention/releases/download/v2.7.1.post1/flash_attn-2.7.1.post1+cu124torch2.5.1cxx11abiFALSE-cp310-cp310-win_amd64.whl pip install kaolin -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.5.1_cu124.html

git clone https://github.com/NVlabs/nvdiffrast.git ./tmp/extensions/nvdiffrast pip install ./tmp/extensions/nvdiffrast

git clone --recurse-submodules https://github.com/JeffreyXiang/diffoctreerast.git ./tmp/extensions/diffoctreerast pip install ./tmp/extensions/diffoctreerast

git clone https://github.com/autonomousvision/mip-splatting.git ./tmp/extensions/mip-splatting pip install ./tmp/extensions/mip-splatting/submodules/diff-gaussian-rasterization/

xcopy .\extensions\vox2seq .\tmp\extensions\vox2seq /E /I pip install ./tmp/extensions/vox2seq

pip install spconv-cu120 pip install gradio==4.44.1 gradio_litmodel3d==0.0.1

Each of these should install without error. If you get an error, copy it into ChatGPT and see if you can resolve it. Once everything is installed without error, you can set up a .bat file to launch the Gradio app.

Copy the following text and paste it into a new text file.

@echo off call conda activate trellis set CUDA_HOME=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4 set PATH=%CUDA_HOME%\bin;%PATH% set ATTN_BACKEND=flash-attn set SPCONV_ALGO=native python ./app.py pause

Save the text file and rename it to RunTrellis.bat

From here, you should be able to double click the bat file. On first run, it will download the necessary models. You may get a message about xformers. I ignored this and everything still ran fine.

You'll end up with a web address. Copy that and paste it into your browser. You should get the Gradio app interface and be able to drag some of the sample images in to test it. Image

worked perfectly at the first shot! Thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests