-
Notifications
You must be signed in to change notification settings - Fork 202
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
Comments
I've spent a few hours trying to make the project run on WSL and it works.
Tagging @JeffreyXiang to confirm it runs in WSL with a bit of fiddling. |
Another solution to run the inference code on Windows.
|
Another example to run the inference code on Windows. #10 |
Can anyone share a WHL for diffoctreerast? |
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. |
@SoftologyPro There are wheels that built from source https://github.com/iiiytn1k/sd-webui-some-stuff/releases/tag/diffoctreerast |
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 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 |
@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. |
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
run.bat
|
ERROR: flash_attn-2.7.1.post1+cu124torch2.5.1cxx11abiFALSE-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. |
Finally the only working 1 click solution, Microsoft has something to learn from this guy: 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. |
Has anyone been able to get spconv-cu120 working on Win? Got passed everything else but keep getting hung up there.
|
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.) |
For those on Windows with working Trellis, what GPU do you have? As I get out of memory issues from diff_gaussian_rasterization Someone of you experienced the same error?
|
Solved it with manually reinstalling thus making it work for 3090 as well:
|
Do you mind me asking what are your average generation times with the 3090 thinking about picking one up. |
Sure @wes-kay 10s on Gaussians and 20s on glb creation from the Gaussians
________________________________
Von: wes-kay ***@***.***>
Gesendet: Mittwoch, 11. Dezember 2024 18:44
An: microsoft/TRELLIS
Cc: DiamondGlassDrill; Comment
Betreff: Re: [microsoft/TRELLIS] Setting Up Trellis on Windows (Issue #3)
> 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.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
from cumm.core_cc import tensorview_bind Does anyone know how to fix this problem? |
The single-click install didn't work. Here's what did: System: Windows 10 In Windows Explorer, make a folder for where you want Trellis to live. I called mine "Trellis" Once in the folder, download the repo from git using the following command: 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: My system had trouble seeing the CUDA toolkit so I had to force the 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 git clone https://github.com/NVlabs/nvdiffrast.git ./tmp/extensions/nvdiffrast git clone --recurse-submodules https://github.com/JeffreyXiang/diffoctreerast.git ./tmp/extensions/diffoctreerast git clone https://github.com/autonomousvision/mip-splatting.git ./tmp/extensions/mip-splatting xcopy .\extensions\vox2seq .\tmp\extensions\vox2seq /E /I pip install spconv-cu120 Each of these should install without error. If you get an error, copy it into ChatGPT and see if you can resolve it. Copy the following text and paste it into a new text file. @echo off 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. |
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 |
worked perfectly at the first shot! Thanks so much! |
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.
The text was updated successfully, but these errors were encountered: