Update
Browse files- app.py +0 -12
- pyproject.toml +4 -4
- requirements.txt +5 -0
- uv.lock +15 -17
app.py
CHANGED
@@ -1,21 +1,9 @@
|
|
1 |
import os
|
2 |
import pathlib
|
3 |
-
import shlex
|
4 |
-
import subprocess
|
5 |
import tempfile
|
6 |
|
7 |
os.environ["SPCONV_ALGO"] = "native"
|
8 |
|
9 |
-
if os.getenv("SPACE_ID"):
|
10 |
-
subprocess.run( # noqa: S603
|
11 |
-
shlex.split("pip install wheels/diff_gaussian_rasterization-0.0.0-cp310-cp310-linux_x86_64.whl"),
|
12 |
-
check=True,
|
13 |
-
)
|
14 |
-
subprocess.run( # noqa: S603
|
15 |
-
shlex.split("pip install wheels/nvdiffrast-0.3.3-cp310-cp310-linux_x86_64.whl"),
|
16 |
-
check=True,
|
17 |
-
)
|
18 |
-
|
19 |
import gradio as gr
|
20 |
import imageio
|
21 |
import numpy as np
|
|
|
1 |
import os
|
2 |
import pathlib
|
|
|
|
|
3 |
import tempfile
|
4 |
|
5 |
os.environ["SPCONV_ALGO"] = "native"
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
import gradio as gr
|
8 |
import imageio
|
9 |
import numpy as np
|
pyproject.toml
CHANGED
@@ -5,6 +5,7 @@ description = ""
|
|
5 |
readme = "README.md"
|
6 |
requires-python = ">=3.10"
|
7 |
dependencies = [
|
|
|
8 |
"easydict>=1.13",
|
9 |
"flash-attn",
|
10 |
"gradio[mcp]>=5.32.0",
|
@@ -12,6 +13,7 @@ dependencies = [
|
|
12 |
"hf-xet>=1.1.2",
|
13 |
"igraph>=0.11.8",
|
14 |
"imageio[ffmpeg]>=2.37.0",
|
|
|
15 |
"onnxruntime>=1.22.0",
|
16 |
"opencv-python-headless>=4.11.0.86",
|
17 |
"pymeshfix>=0.17.1",
|
@@ -32,13 +34,11 @@ dependencies = [
|
|
32 |
[tool.uv.sources]
|
33 |
flash-attn = { url = "https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.0.post2/flash_attn-2.7.0.post2+cu12torch2.4cxx11abiFALSE-cp310-cp310-linux_x86_64.whl" }
|
34 |
utils3d = { git = "https://github.com/EasternJournalist/utils3d.git", rev = "9a4eb15e4021b67b12c460c7057d642626897ec8" }
|
35 |
-
diff-gaussian-rasterization = {
|
36 |
-
nvdiffrast = {
|
37 |
|
38 |
[dependency-groups]
|
39 |
dev = [
|
40 |
-
"diff-gaussian-rasterization",
|
41 |
-
"nvdiffrast",
|
42 |
"setuptools>=80.8.0",
|
43 |
]
|
44 |
|
|
|
5 |
readme = "README.md"
|
6 |
requires-python = ">=3.10"
|
7 |
dependencies = [
|
8 |
+
"diff-gaussian-rasterization",
|
9 |
"easydict>=1.13",
|
10 |
"flash-attn",
|
11 |
"gradio[mcp]>=5.32.0",
|
|
|
13 |
"hf-xet>=1.1.2",
|
14 |
"igraph>=0.11.8",
|
15 |
"imageio[ffmpeg]>=2.37.0",
|
16 |
+
"nvdiffrast",
|
17 |
"onnxruntime>=1.22.0",
|
18 |
"opencv-python-headless>=4.11.0.86",
|
19 |
"pymeshfix>=0.17.1",
|
|
|
34 |
[tool.uv.sources]
|
35 |
flash-attn = { url = "https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.0.post2/flash_attn-2.7.0.post2+cu12torch2.4cxx11abiFALSE-cp310-cp310-linux_x86_64.whl" }
|
36 |
utils3d = { git = "https://github.com/EasternJournalist/utils3d.git", rev = "9a4eb15e4021b67b12c460c7057d642626897ec8" }
|
37 |
+
diff-gaussian-rasterization = { url = "https://huggingface.co/spaces/hysts-mcp/TRELLIS/resolve/main/wheels/diff_gaussian_rasterization-0.0.0-cp310-cp310-linux_x86_64.whl" }
|
38 |
+
nvdiffrast = { url = "https://huggingface.co/spaces/hysts-mcp/TRELLIS/resolve/main/wheels/nvdiffrast-0.3.3-cp310-cp310-linux_x86_64.whl" }
|
39 |
|
40 |
[dependency-groups]
|
41 |
dev = [
|
|
|
|
|
42 |
"setuptools>=80.8.0",
|
43 |
]
|
44 |
|
requirements.txt
CHANGED
@@ -38,6 +38,8 @@ cumm-cu120==0.4.11
|
|
38 |
# via spconv-cu120
|
39 |
cycler==0.12.1
|
40 |
# via matplotlib
|
|
|
|
|
41 |
easydict==1.13
|
42 |
# via trellis (pyproject.toml)
|
43 |
einops==0.8.1
|
@@ -172,6 +174,7 @@ numpy==2.2.6
|
|
172 |
# imageio
|
173 |
# matplotlib
|
174 |
# numba
|
|
|
175 |
# onnxruntime
|
176 |
# opencv-python-headless
|
177 |
# pandas
|
@@ -189,6 +192,8 @@ numpy==2.2.6
|
|
189 |
# trimesh
|
190 |
# utils3d
|
191 |
# xformers
|
|
|
|
|
192 |
nvidia-cublas-cu12==12.1.3.1
|
193 |
# via
|
194 |
# nvidia-cudnn-cu12
|
|
|
38 |
# via spconv-cu120
|
39 |
cycler==0.12.1
|
40 |
# via matplotlib
|
41 |
+
diff-gaussian-rasterization @ https://huggingface.co/spaces/hysts-mcp/TRELLIS/resolve/main/wheels/diff_gaussian_rasterization-0.0.0-cp310-cp310-linux_x86_64.whl
|
42 |
+
# via trellis (pyproject.toml)
|
43 |
easydict==1.13
|
44 |
# via trellis (pyproject.toml)
|
45 |
einops==0.8.1
|
|
|
174 |
# imageio
|
175 |
# matplotlib
|
176 |
# numba
|
177 |
+
# nvdiffrast
|
178 |
# onnxruntime
|
179 |
# opencv-python-headless
|
180 |
# pandas
|
|
|
192 |
# trimesh
|
193 |
# utils3d
|
194 |
# xformers
|
195 |
+
nvdiffrast @ https://huggingface.co/spaces/hysts-mcp/TRELLIS/resolve/main/wheels/nvdiffrast-0.3.3-cp310-cp310-linux_x86_64.whl
|
196 |
+
# via trellis (pyproject.toml)
|
197 |
nvidia-cublas-cu12==12.1.3.1
|
198 |
# via
|
199 |
# nvidia-cudnn-cu12
|
uv.lock
CHANGED
@@ -311,9 +311,9 @@ wheels = [
|
|
311 |
[[package]]
|
312 |
name = "diff-gaussian-rasterization"
|
313 |
version = "0.0.0"
|
314 |
-
source = {
|
315 |
wheels = [
|
316 |
-
{
|
317 |
]
|
318 |
|
319 |
[[package]]
|
@@ -1277,12 +1277,12 @@ wheels = [
|
|
1277 |
[[package]]
|
1278 |
name = "nvdiffrast"
|
1279 |
version = "0.3.3"
|
1280 |
-
source = {
|
1281 |
dependencies = [
|
1282 |
{ name = "numpy" },
|
1283 |
]
|
1284 |
wheels = [
|
1285 |
-
{
|
1286 |
]
|
1287 |
|
1288 |
[package.metadata]
|
@@ -1325,7 +1325,7 @@ name = "nvidia-cudnn-cu12"
|
|
1325 |
version = "9.1.0.70"
|
1326 |
source = { registry = "https://pypi.org/simple" }
|
1327 |
dependencies = [
|
1328 |
-
{ name = "nvidia-cublas-cu12" },
|
1329 |
]
|
1330 |
wheels = [
|
1331 |
{ url = "https://files.pythonhosted.org/packages/9f/fd/713452cd72343f682b1c7b9321e23829f00b842ceaedcda96e742ea0b0b3/nvidia_cudnn_cu12-9.1.0.70-py3-none-manylinux2014_x86_64.whl", hash = "sha256:165764f44ef8c61fcdfdfdbe769d687e06374059fbb388b6c89ecb0e28793a6f", size = 664752741, upload-time = "2024-04-22T15:24:15.253Z" },
|
@@ -1352,9 +1352,9 @@ name = "nvidia-cusolver-cu12"
|
|
1352 |
version = "11.4.5.107"
|
1353 |
source = { registry = "https://pypi.org/simple" }
|
1354 |
dependencies = [
|
1355 |
-
{ name = "nvidia-cublas-cu12" },
|
1356 |
-
{ name = "nvidia-cusparse-cu12" },
|
1357 |
-
{ name = "nvidia-nvjitlink-cu12" },
|
1358 |
]
|
1359 |
wheels = [
|
1360 |
{ url = "https://files.pythonhosted.org/packages/bc/1d/8de1e5c67099015c834315e333911273a8c6aaba78923dd1d1e25fc5f217/nvidia_cusolver_cu12-11.4.5.107-py3-none-manylinux1_x86_64.whl", hash = "sha256:8a7ec542f0412294b15072fa7dab71d31334014a69f953004ea7a118206fe0dd", size = 124161928, upload-time = "2023-04-19T15:51:25.781Z" },
|
@@ -1365,7 +1365,7 @@ name = "nvidia-cusparse-cu12"
|
|
1365 |
version = "12.1.0.106"
|
1366 |
source = { registry = "https://pypi.org/simple" }
|
1367 |
dependencies = [
|
1368 |
-
{ name = "nvidia-nvjitlink-cu12" },
|
1369 |
]
|
1370 |
wheels = [
|
1371 |
{ url = "https://files.pythonhosted.org/packages/65/5b/cfaeebf25cd9fdec14338ccb16f6b2c4c7fa9163aefcf057d86b9cc248bb/nvidia_cusparse_cu12-12.1.0.106-py3-none-manylinux1_x86_64.whl", hash = "sha256:f3b50f42cf363f86ab21f720998517a659a48131e8d538dc02f8768237bd884c", size = 195958278, upload-time = "2023-04-19T15:51:49.939Z" },
|
@@ -2771,6 +2771,7 @@ name = "trellis"
|
|
2771 |
version = "0.1.0"
|
2772 |
source = { virtual = "." }
|
2773 |
dependencies = [
|
|
|
2774 |
{ name = "easydict" },
|
2775 |
{ name = "flash-attn" },
|
2776 |
{ name = "gradio", extra = ["mcp"] },
|
@@ -2778,6 +2779,7 @@ dependencies = [
|
|
2778 |
{ name = "hf-xet" },
|
2779 |
{ name = "igraph" },
|
2780 |
{ name = "imageio", extra = ["ffmpeg"] },
|
|
|
2781 |
{ name = "onnxruntime" },
|
2782 |
{ name = "opencv-python-headless" },
|
2783 |
{ name = "pymeshfix" },
|
@@ -2797,13 +2799,12 @@ dependencies = [
|
|
2797 |
|
2798 |
[package.dev-dependencies]
|
2799 |
dev = [
|
2800 |
-
{ name = "diff-gaussian-rasterization" },
|
2801 |
-
{ name = "nvdiffrast" },
|
2802 |
{ name = "setuptools" },
|
2803 |
]
|
2804 |
|
2805 |
[package.metadata]
|
2806 |
requires-dist = [
|
|
|
2807 |
{ name = "easydict", specifier = ">=1.13" },
|
2808 |
{ name = "flash-attn", url = "https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.0.post2/flash_attn-2.7.0.post2+cu12torch2.4cxx11abiFALSE-cp310-cp310-linux_x86_64.whl" },
|
2809 |
{ name = "gradio", extras = ["mcp"], specifier = ">=5.32.0" },
|
@@ -2811,6 +2812,7 @@ requires-dist = [
|
|
2811 |
{ name = "hf-xet", specifier = ">=1.1.2" },
|
2812 |
{ name = "igraph", specifier = ">=0.11.8" },
|
2813 |
{ name = "imageio", extras = ["ffmpeg"], specifier = ">=2.37.0" },
|
|
|
2814 |
{ name = "onnxruntime", specifier = ">=1.22.0" },
|
2815 |
{ name = "opencv-python-headless", specifier = ">=4.11.0.86" },
|
2816 |
{ name = "pymeshfix", specifier = ">=0.17.1" },
|
@@ -2829,11 +2831,7 @@ requires-dist = [
|
|
2829 |
]
|
2830 |
|
2831 |
[package.metadata.requires-dev]
|
2832 |
-
dev = [
|
2833 |
-
{ name = "diff-gaussian-rasterization", path = "wheels/diff_gaussian_rasterization-0.0.0-cp310-cp310-linux_x86_64.whl" },
|
2834 |
-
{ name = "nvdiffrast", path = "wheels/nvdiffrast-0.3.3-cp310-cp310-linux_x86_64.whl" },
|
2835 |
-
{ name = "setuptools", specifier = ">=80.8.0" },
|
2836 |
-
]
|
2837 |
|
2838 |
[[package]]
|
2839 |
name = "trimesh"
|
@@ -2852,7 +2850,7 @@ name = "triton"
|
|
2852 |
version = "3.0.0"
|
2853 |
source = { registry = "https://pypi.org/simple" }
|
2854 |
dependencies = [
|
2855 |
-
{ name = "filelock" },
|
2856 |
]
|
2857 |
wheels = [
|
2858 |
{ url = "https://files.pythonhosted.org/packages/45/27/14cc3101409b9b4b9241d2ba7deaa93535a217a211c86c4cc7151fb12181/triton-3.0.0-1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e1efef76935b2febc365bfadf74bcb65a6f959a9872e5bddf44cc9e0adce1e1a", size = 209376304, upload-time = "2024-07-19T20:56:41.483Z" },
|
|
|
311 |
[[package]]
|
312 |
name = "diff-gaussian-rasterization"
|
313 |
version = "0.0.0"
|
314 |
+
source = { url = "https://huggingface.co/spaces/hysts-mcp/TRELLIS/resolve/main/wheels/diff_gaussian_rasterization-0.0.0-cp310-cp310-linux_x86_64.whl" }
|
315 |
wheels = [
|
316 |
+
{ url = "https://huggingface.co/spaces/hysts-mcp/TRELLIS/resolve/main/wheels/diff_gaussian_rasterization-0.0.0-cp310-cp310-linux_x86_64.whl", hash = "sha256:bd33150078ce0aab90b5628df0c0b6d5792671422cefe5ee2ceb36ff003239d0" },
|
317 |
]
|
318 |
|
319 |
[[package]]
|
|
|
1277 |
[[package]]
|
1278 |
name = "nvdiffrast"
|
1279 |
version = "0.3.3"
|
1280 |
+
source = { url = "https://huggingface.co/spaces/hysts-mcp/TRELLIS/resolve/main/wheels/nvdiffrast-0.3.3-cp310-cp310-linux_x86_64.whl" }
|
1281 |
dependencies = [
|
1282 |
{ name = "numpy" },
|
1283 |
]
|
1284 |
wheels = [
|
1285 |
+
{ url = "https://huggingface.co/spaces/hysts-mcp/TRELLIS/resolve/main/wheels/nvdiffrast-0.3.3-cp310-cp310-linux_x86_64.whl", hash = "sha256:026b3031cc647d279b5beb0a3ec2bfe992666d85f66431662d8f26be2b6894f9" },
|
1286 |
]
|
1287 |
|
1288 |
[package.metadata]
|
|
|
1325 |
version = "9.1.0.70"
|
1326 |
source = { registry = "https://pypi.org/simple" }
|
1327 |
dependencies = [
|
1328 |
+
{ name = "nvidia-cublas-cu12", marker = "(platform_machine != 'aarch64' and sys_platform == 'linux') or (sys_platform != 'darwin' and sys_platform != 'linux')" },
|
1329 |
]
|
1330 |
wheels = [
|
1331 |
{ url = "https://files.pythonhosted.org/packages/9f/fd/713452cd72343f682b1c7b9321e23829f00b842ceaedcda96e742ea0b0b3/nvidia_cudnn_cu12-9.1.0.70-py3-none-manylinux2014_x86_64.whl", hash = "sha256:165764f44ef8c61fcdfdfdbe769d687e06374059fbb388b6c89ecb0e28793a6f", size = 664752741, upload-time = "2024-04-22T15:24:15.253Z" },
|
|
|
1352 |
version = "11.4.5.107"
|
1353 |
source = { registry = "https://pypi.org/simple" }
|
1354 |
dependencies = [
|
1355 |
+
{ name = "nvidia-cublas-cu12", marker = "(platform_machine != 'aarch64' and sys_platform == 'linux') or (sys_platform != 'darwin' and sys_platform != 'linux')" },
|
1356 |
+
{ name = "nvidia-cusparse-cu12", marker = "(platform_machine != 'aarch64' and sys_platform == 'linux') or (sys_platform != 'darwin' and sys_platform != 'linux')" },
|
1357 |
+
{ name = "nvidia-nvjitlink-cu12", marker = "(platform_machine != 'aarch64' and sys_platform == 'linux') or (sys_platform != 'darwin' and sys_platform != 'linux')" },
|
1358 |
]
|
1359 |
wheels = [
|
1360 |
{ url = "https://files.pythonhosted.org/packages/bc/1d/8de1e5c67099015c834315e333911273a8c6aaba78923dd1d1e25fc5f217/nvidia_cusolver_cu12-11.4.5.107-py3-none-manylinux1_x86_64.whl", hash = "sha256:8a7ec542f0412294b15072fa7dab71d31334014a69f953004ea7a118206fe0dd", size = 124161928, upload-time = "2023-04-19T15:51:25.781Z" },
|
|
|
1365 |
version = "12.1.0.106"
|
1366 |
source = { registry = "https://pypi.org/simple" }
|
1367 |
dependencies = [
|
1368 |
+
{ name = "nvidia-nvjitlink-cu12", marker = "(platform_machine != 'aarch64' and sys_platform == 'linux') or (sys_platform != 'darwin' and sys_platform != 'linux')" },
|
1369 |
]
|
1370 |
wheels = [
|
1371 |
{ url = "https://files.pythonhosted.org/packages/65/5b/cfaeebf25cd9fdec14338ccb16f6b2c4c7fa9163aefcf057d86b9cc248bb/nvidia_cusparse_cu12-12.1.0.106-py3-none-manylinux1_x86_64.whl", hash = "sha256:f3b50f42cf363f86ab21f720998517a659a48131e8d538dc02f8768237bd884c", size = 195958278, upload-time = "2023-04-19T15:51:49.939Z" },
|
|
|
2771 |
version = "0.1.0"
|
2772 |
source = { virtual = "." }
|
2773 |
dependencies = [
|
2774 |
+
{ name = "diff-gaussian-rasterization" },
|
2775 |
{ name = "easydict" },
|
2776 |
{ name = "flash-attn" },
|
2777 |
{ name = "gradio", extra = ["mcp"] },
|
|
|
2779 |
{ name = "hf-xet" },
|
2780 |
{ name = "igraph" },
|
2781 |
{ name = "imageio", extra = ["ffmpeg"] },
|
2782 |
+
{ name = "nvdiffrast" },
|
2783 |
{ name = "onnxruntime" },
|
2784 |
{ name = "opencv-python-headless" },
|
2785 |
{ name = "pymeshfix" },
|
|
|
2799 |
|
2800 |
[package.dev-dependencies]
|
2801 |
dev = [
|
|
|
|
|
2802 |
{ name = "setuptools" },
|
2803 |
]
|
2804 |
|
2805 |
[package.metadata]
|
2806 |
requires-dist = [
|
2807 |
+
{ name = "diff-gaussian-rasterization", url = "https://huggingface.co/spaces/hysts-mcp/TRELLIS/resolve/main/wheels/diff_gaussian_rasterization-0.0.0-cp310-cp310-linux_x86_64.whl" },
|
2808 |
{ name = "easydict", specifier = ">=1.13" },
|
2809 |
{ name = "flash-attn", url = "https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.0.post2/flash_attn-2.7.0.post2+cu12torch2.4cxx11abiFALSE-cp310-cp310-linux_x86_64.whl" },
|
2810 |
{ name = "gradio", extras = ["mcp"], specifier = ">=5.32.0" },
|
|
|
2812 |
{ name = "hf-xet", specifier = ">=1.1.2" },
|
2813 |
{ name = "igraph", specifier = ">=0.11.8" },
|
2814 |
{ name = "imageio", extras = ["ffmpeg"], specifier = ">=2.37.0" },
|
2815 |
+
{ name = "nvdiffrast", url = "https://huggingface.co/spaces/hysts-mcp/TRELLIS/resolve/main/wheels/nvdiffrast-0.3.3-cp310-cp310-linux_x86_64.whl" },
|
2816 |
{ name = "onnxruntime", specifier = ">=1.22.0" },
|
2817 |
{ name = "opencv-python-headless", specifier = ">=4.11.0.86" },
|
2818 |
{ name = "pymeshfix", specifier = ">=0.17.1" },
|
|
|
2831 |
]
|
2832 |
|
2833 |
[package.metadata.requires-dev]
|
2834 |
+
dev = [{ name = "setuptools", specifier = ">=80.8.0" }]
|
|
|
|
|
|
|
|
|
2835 |
|
2836 |
[[package]]
|
2837 |
name = "trimesh"
|
|
|
2850 |
version = "3.0.0"
|
2851 |
source = { registry = "https://pypi.org/simple" }
|
2852 |
dependencies = [
|
2853 |
+
{ name = "filelock", marker = "(python_full_version < '3.13' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version < '3.13' and sys_platform != 'darwin' and sys_platform != 'linux')" },
|
2854 |
]
|
2855 |
wheels = [
|
2856 |
{ url = "https://files.pythonhosted.org/packages/45/27/14cc3101409b9b4b9241d2ba7deaa93535a217a211c86c4cc7151fb12181/triton-3.0.0-1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e1efef76935b2febc365bfadf74bcb65a6f959a9872e5bddf44cc9e0adce1e1a", size = 209376304, upload-time = "2024-07-19T20:56:41.483Z" },
|