Spaces:
Paused
Paused
Revert to torch 2.6.0 + Jeff Xiang prebuilt nvdiffrast wheel
Browse filesZeroGPU machine has CUDA 13.0 toolkit; torch 2.8.0 was compiled with
CUDA 12.8 — any C++ extension compilation fails with a hard version
mismatch error. The prebuilt wheel (compiled against torch 2.6.0 + cu124)
installs without nvcc and has matching ABI. Hunyuan3D is diffusers-based
with no custom CUDA ops so it runs fine on 2.6.0.
- app.py +0 -25
- requirements.txt +12 -10
app.py
CHANGED
|
@@ -19,37 +19,12 @@ Deployed exclusively on HF Spaces ZeroGPU — no local execution path.
|
|
| 19 |
|
| 20 |
from __future__ import annotations
|
| 21 |
|
| 22 |
-
import subprocess
|
| 23 |
-
import sys
|
| 24 |
import time
|
| 25 |
from pathlib import Path
|
| 26 |
|
| 27 |
import gradio as gr
|
| 28 |
import spaces # HF ZeroGPU
|
| 29 |
|
| 30 |
-
|
| 31 |
-
def _install_nvdiffrast() -> None:
|
| 32 |
-
"""Install nvdiffrast from source if not present.
|
| 33 |
-
|
| 34 |
-
Must run after torch is installed (requirements.txt), so we do it here
|
| 35 |
-
rather than in requirements.txt where pip's build isolation would hide
|
| 36 |
-
torch from the nvdiffrast build system.
|
| 37 |
-
"""
|
| 38 |
-
try:
|
| 39 |
-
import nvdiffrast # noqa: F401
|
| 40 |
-
return
|
| 41 |
-
except (ImportError, OSError):
|
| 42 |
-
pass
|
| 43 |
-
print("nvdiffrast not found — building from source (takes ~2 min)...", flush=True)
|
| 44 |
-
subprocess.run(
|
| 45 |
-
[sys.executable, "-m", "pip", "install", "--no-build-isolation",
|
| 46 |
-
"git+https://github.com/NVlabs/nvdiffrast.git"],
|
| 47 |
-
check=False,
|
| 48 |
-
)
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
_install_nvdiffrast()
|
| 52 |
-
|
| 53 |
from src import quota, ui_helpers, workspace
|
| 54 |
from src.stages.stage1_generate import generate_trellis, generate_hunyuan
|
| 55 |
|
|
|
|
| 19 |
|
| 20 |
from __future__ import annotations
|
| 21 |
|
|
|
|
|
|
|
| 22 |
import time
|
| 23 |
from pathlib import Path
|
| 24 |
|
| 25 |
import gradio as gr
|
| 26 |
import spaces # HF ZeroGPU
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
from src import quota, ui_helpers, workspace
|
| 29 |
from src.stages.stage1_generate import generate_trellis, generate_hunyuan
|
| 30 |
|
requirements.txt
CHANGED
|
@@ -8,13 +8,14 @@ numpy
|
|
| 8 |
pillow
|
| 9 |
|
| 10 |
# ===== Milestone 2: Stage 1 Generation =====
|
| 11 |
-
#
|
| 12 |
-
#
|
| 13 |
-
#
|
| 14 |
-
#
|
|
|
|
| 15 |
gradio_client # call TRELLIS.2 Space
|
| 16 |
-
torch==2.
|
| 17 |
-
torchvision==0.
|
| 18 |
imageio==2.37.2
|
| 19 |
imageio-ffmpeg==0.6.0
|
| 20 |
tqdm==4.67.1
|
|
@@ -50,10 +51,11 @@ xatlas
|
|
| 50 |
scipy # normal map dilation
|
| 51 |
|
| 52 |
# ===== Milestone 5: Stage 2F Normal Baking =====
|
| 53 |
-
#
|
| 54 |
-
#
|
| 55 |
-
# the
|
| 56 |
-
#
|
|
|
|
| 57 |
|
| 58 |
coacd==1.0.4 # Milestone 8 collision
|
| 59 |
|
|
|
|
| 8 |
pillow
|
| 9 |
|
| 10 |
# ===== Milestone 2: Stage 1 Generation =====
|
| 11 |
+
# torch 2.6.0 + cu124 is the version Jeff Xiang's prebuilt nvdiffrast wheel
|
| 12 |
+
# was compiled against, and matches the ZeroGPU base image CUDA toolkit.
|
| 13 |
+
# 2.8.0 was tried but the ZeroGPU machine has CUDA 13.0 toolkit while
|
| 14 |
+
# torch 2.8.0 is compiled with CUDA 12.8 — any C++ extension build fails.
|
| 15 |
+
# Hunyuan3D-2.1 (diffusers-based, no custom CUDA ops) works on 2.6.0.
|
| 16 |
gradio_client # call TRELLIS.2 Space
|
| 17 |
+
torch==2.6.0
|
| 18 |
+
torchvision==0.21.0
|
| 19 |
imageio==2.37.2
|
| 20 |
imageio-ffmpeg==0.6.0
|
| 21 |
tqdm==4.67.1
|
|
|
|
| 51 |
scipy # normal map dilation
|
| 52 |
|
| 53 |
# ===== Milestone 5: Stage 2F Normal Baking =====
|
| 54 |
+
# Jeff Xiang's prebuilt wheel — compiled against torch 2.6.0 + cu124.
|
| 55 |
+
# Prebuilt = no nvcc/CUDA toolkit needed at install time; ABI matches
|
| 56 |
+
# the torch version above. If import fails at runtime, baking stages
|
| 57 |
+
# degrade gracefully (they catch the error internally).
|
| 58 |
+
https://github.com/JeffreyXiang/Storages/releases/download/Space_Wheels_251210/nvdiffrast-0.4.0-cp310-cp310-linux_x86_64.whl
|
| 59 |
|
| 60 |
coacd==1.0.4 # Milestone 8 collision
|
| 61 |
|