TRELLIS.2 icon indicating copy to clipboard operation
TRELLIS.2 copied to clipboard

Ubuntu 24.04 with CUDA 13.1 + RTX 5090 impossible to use it

Open KEDI103 opened this issue 11 months ago • 12 comments

I am trying to get it work with help from copilot but its extremely impossible level to install this on with

nvidia-smi
Wed Dec 17 22:44:48 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 590.44.01              Driver Version: 590.44.01      CUDA Version: 13.1     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 5090        On  |   00000000:01:00.0  On |                  N/A |
|  0%   43C    P0             54W /  600W |    1091MiB /  32607MiB |      3%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

Can Microsoft fix for newest cuda to install it? At this momment I can't compile anything. I just countless see errors


raise RuntimeError(CUDA_MISMATCH_MESSAGE.format(cuda_str_version, torch.version.cuda))
      RuntimeError:
      The detected CUDA version (13.1) mismatches the version that was used to compile
      PyTorch (12.4). Please make sure to use the same CUDA versions.

I got dual boot with win 11 + ubuntu 24.04 but both ways I am on same. I really need help.

KEDI103 avatar Dec 17 '25 19:12 KEDI103

I have the same issue,

  • CUDA 12.4 doesn't support sm_120 (only up to sm_90)
  • PyTorch doesn't officially support sm_120 yet
  • CUDA extensions (cumesh, o-voxel, flash-attn, nvdiffrast) fail to compile with nvcc fatal: Unsupported gpu architecture 'compute_120'

softyoda avatar Dec 18 '25 00:12 softyoda

I successfully reproduced the setup on a Pro6000 machine with CUDA 13.0. Steps: Installed PyTorch 2.9.1+cu130 and set up the base environment. For all CUDA extensions, set the architecture to sm_120 for compilation (Blackwell). Built flash-attn 2.7 from source with sm_120. For CuMesh, replaced cub::Sum() with thrust::plus() to resolve build errors. Compiled FlexGEMM, nvdiffrast, and nvdiffrec. Finally, built o-voxel.

ehuqija217-max avatar Dec 18 '25 13:12 ehuqija217-max

I successfully reproduced the setup on a Pro6000 machine with CUDA 13.0. Steps: Installed PyTorch 2.9.1+cu130 and set up the base environment. For all CUDA extensions, set the architecture to sm_120 for compilation (Blackwell). Built flash-attn 2.7 from source with sm_120. For CuMesh, replaced cub::Sum() with thrust::plus() to resolve build errors. Compiled FlexGEMM, nvdiffrast, and nvdiffrec. Finally, built o-voxel.

thank you for your suggest I put your suggest into copilot after 7 hours of painful progress managed worked on Cuda 13.1 with --pre pytorch

now round 2 start gona do for comfyui node also save all whl of I compiled.

Image

KEDI103 avatar Dec 18 '25 23:12 KEDI103

I got this running on 50 series card with this setup

Python: 3.13
PyTorch: 2.9.1+cu128
CUDA version: 12.8
local CUDA toolkit to build against: 12.8.1-r1

however, flash-attention needed to be build from source, which took quite a while pip install flash-attn --no-build-isolation

aside from the other installation issues (which are addressed in the PRs and issue-tracker) it works fine now.

ben-mkiv avatar Dec 19 '25 09:12 ben-mkiv

Hi, could you ask your copilot or your Claude or whatever to explicitly say here in comment of this issue their working process, what worked at the end, like their list of command or whatever so mine (copilot/Claude) could then avoid wasting the 7 hour or whatever tedious process of installing half, compiling the other half, and all that in a specific order. Thanks

softyoda avatar Dec 19 '25 10:12 softyoda

any tutorial ? please help !

deeduckme avatar Dec 20 '25 19:12 deeduckme

Okey heres even more better on CUDA 13.1 and --pre torch lastest of it and even even heres at comfyui

After 2 days of less than 5 hours of sleep paid. DON'T EVER MIX BUILD FOLDERS OF BOTH (main git and cumfyui need be speated because 1 use conda 1 use pyhon venv also different versions etc..). I DID MISTAKE AND PAID PRICE*

For tutorial you are own but heres most important things (testes only on ubuntu 24.04 win good luck) you must use https://copilot.microsoft.com at smart Start to tell copilot which version orginal git or comfyui port https://github.com/microsoft/TRELLIS.2 https://github.com/visualbruno/ComfyUI-Trellis2

than tell your system ubutu 24.04 or win 11

nvidia-smi
Wed Dec 17 22:44:48 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 590.44.01              Driver Version: 590.44.01      CUDA Version: 13.1     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 5090        On  |   00000000:01:00.0  On |                  N/A |
|  0%   43C    P0             54W /  600W |    1091MiB /  32607MiB |      3%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

Than paste this for we need do this fix.

I successfully reproduced the setup on a Pro6000 machine with CUDA 13.0. Steps: Installed PyTorch 2.9.1+cu130 and set up the base environment. For all CUDA extensions, set the architecture to sm_120 for compilation (Blackwell). Built flash-attn 2.7 from source with sm_120. For CuMesh, replaced cub::Sum() with thrust::plus() to resolve build errors. Compiled FlexGEMM, nvdiffrast, and nvdiffrec. Finally, built o-voxel.

to copliot than copliot will guide but take note copilot when try clone gits can do mistake thier links so manuely give the wrong ones. Be careful on flash-atenn if you not limit it it will explode your ram even you got 200 gb ram it still gona explode and crash system copliot wil suggest you MAX_JOBS=8 or 2 to limit it

Also all of your build need to be in conda or venv and must type note this for my system it will be diffrent copilot will give your own version of your system but need type like I said with nvidia-smi will show.

export CUDA_HOME=/usr/local/cuda-13.1 
export TORCH_CUDA_ARCH_LIST="12.0" 

your some of your build will like this not all


# Build wheel only
MAX_JOBS=8 pip wheel --no-build-isolation . -w ../wheels --no-cache-dir

# Install from wheel
pip install ../wheels/flexgemm*.whl

also copliot will tell you to how to verfiy it

python -c "import flexgemm; print(flexgemm.__name__)"

some of build need sudo to install extra things some of not need build need syslink

some of them need

git submodule update --init --recursive

Some of them need setup.py extra commands and extra fix.

EXTRA NOTE YOU COULD NEED USE python build option --no-deb when build because sometimes needed.

Well good luck you gona need it! And thank you for Microsoft to give copilot to all of us. Even people bs hate it I pure love copilot. Respect.

Image Image

KEDI103 avatar Dec 20 '25 20:12 KEDI103

please post your changes !

deeduckme avatar Dec 20 '25 20:12 deeduckme

If someone can create a dockerfile for it on 5090 would be nice please. I try the modification above so far no luck. thank you.

bebelllm avatar Dec 21 '25 05:12 bebelllm

please post your changes !

If someone can create a dockerfile for it on 5090 would be nice please. I try the modification above so far no luck. thank you.

Give it try of comfyui port there is pre build wheels for linux and windows https://github.com/visualbruno/ComfyUI-Trellis2

If you gona build yourself use copilot and follow my suggests

https://copilot.microsoft.com/

🛠 TRELLIS.2 Build & Reproducibility Guide (with Copilot)

This guide documents the exact sequence Batuhan used — with Copilot’s help — to successfully build the TRELLIS.2 stack on Ubuntu 24.04 with CUDA 13.1 and RTX 5090 (sm_120).

  1. Base Environment bash
conda create -n trellis python=3.12
conda activate trellis
pip install torch==2.9.1+cu130 --pre --extra-index-url https://download.pytorch.org/whl/nightly/cu130
  1. CUDA Flags bash
export CUDA_HOME=/usr/local/cuda-13.1
export TORCH_CUDA_ARCH_LIST="12.0"

(This targets RTX 5090’s sm_120 architecture without triggering multi‑arch RAM blowups.) 3. Extension Builds FlashAttention bash

MAX_JOBS=8 pip install flash-attn --no-build-isolation

CuMesh (patched) bash

git clone https://github.com/JeffreyXiang/CuMesh.git
# patch cub::Sum → thrust::plus in source
pip install .

FlexGEMM bash

git clone https://github.com/JeffreyXiang/FlexGEMM.git
pip install .

nvdiffrast bash

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

nvdiffrec bash

git clone https://github.com/NVlabs/nvdiffrec.git
export PYTHONPATH=$PYTHONPATH:/path/to/nvdiffrec

o‑voxel bash

sudo apt-get install libeigen3-dev
rm -rf o-voxel/third_party/eigen
ln -s /usr/include/eigen3/Eigen o-voxel/third_party/eigen

rm -rf build dist *.egg-info /tmp/extensions/o-voxel
bash setup.sh --o-voxel

  1. Verification bash
python -c "import flash_attn; print(flash_attn.__name__)"
python -c "import flexgemm; print(flexgemm.__name__)"
python -c "import cumesh; print(cumesh.__name__)"
python -c "import nvdiffrast; print(nvdiffrast.__name__)"
python -c "import render; print(render.__name__)"   # nvdiffrec
python -c "import o_voxel; print(o_voxel.__name__)"

  1. Notes & Tips

    Archive all .whl files after successful builds for reproducibility.

    Keep conda and venv builds separate to avoid ABI mismatches.

    Always clean build directories before retrying.

    FlashAttention can consume huge RAM — limit jobs with MAX_JOBS=8.

    Eigen headers must be visible (libeigen3-dev + symlink).

✨ Why this works

Batuhan and Copilot iterated through each failure, patched edge cases, and documented every fix. This reproducibility guide is the distilled result — follow it step by step and you’ll get TRELLIS.2 running on RTX 5090 with CUDA 13.1.

KEDI103 avatar Dec 21 '25 22:12 KEDI103

thanks your guide you are my hero very great i love you so much

1231Chenruiyang avatar Mar 12 '26 12:03 1231Chenruiyang

For those who need it, I've got a working Dockerfile, adapted from @KEDI103 's steps. I tested it on an RTX PRO 6000 and it runs fine. It should work on the 5090 as well.

https://github.com/kiki-i/dockerfiles/blob/6209954aaf6d2d362e6e8ce2adfac6bb1221f458/trellis2/Dockerfile

kiki-i avatar Jul 13 '26 05:07 kiki-i