Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
TRELLIS.2/setup.sh at main · microsoft/TRELLIS.2 · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
See all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
microsoft
TRELLIS.2
Repository navigation
Code
Issues
131
(131)
Pull requests
30
(30)
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
TRELLIS.2
/
setup.sh
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
139 lines (123 loc) · 4.4 KB
main
Breadcrumbs
TRELLIS.2
/
setup.sh
Copy path
Top
File metadata and controls
Code
Blame
139 lines (123 loc) · 4.4 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#
Read Arguments
TEMP=
`
getopt -o h --long help,new-env,basic,flash-attn,cumesh,o-voxel,flexgemm,nvdiffrast,nvdiffrec -n
'
setup.sh
'
--
"
$@
"
`
eval
set
--
"
$TEMP
"
HELP=false
NEW_ENV=false
BASIC=false
FLASHATTN=false
CUMESH=false
OVOXEL=false
FLEXGEMM=false
NVDIFFRAST=false
NVDIFFREC=false
ERROR=false
if
[
"
$#
"
-eq
1 ]
;
then
HELP=true
fi
while
true
;
do
case
"
$1
"
in
-h|--help) HELP=true
;
shift
;;
--new-env) NEW_ENV=true
;
shift
;;
--basic) BASIC=true
;
shift
;;
--flash-attn) FLASHATTN=true
;
shift
;;
--cumesh) CUMESH=true
;
shift
;;
--o-voxel) OVOXEL=true
;
shift
;;
--flexgemm) FLEXGEMM=true
;
shift
;;
--nvdiffrast) NVDIFFRAST=true
;
shift
;;
--nvdiffrec) NVDIFFREC=true
;
shift
;;
--)
shift
;
break
;;
*
) ERROR=true
;
break
;;
esac
done
if
[
"
$ERROR
"
=
true
]
;
then
echo
"
Error: Invalid argument
"
HELP=true
fi
if
[
"
$HELP
"
=
true
]
;
then
echo
"
Usage: setup.sh [OPTIONS]
"
echo
"
Options:
"
echo
"
-h, --help Display this help message
"
echo
"
--new-env Create a new conda environment
"
echo
"
--basic Install basic dependencies
"
echo
"
--flash-attn Install flash-attention
"
echo
"
--cumesh Install cumesh
"
echo
"
--o-voxel Install o-voxel
"
echo
"
--flexgemm Install flexgemm
"
echo
"
--nvdiffrast Install nvdiffrast
"
echo
"
--nvdiffrec Install nvdiffrec
"
return
fi
#
Get system information
WORKDIR=
$(
pwd
)
if
command
-v nvidia-smi
>
/dev/null
;
then
PLATFORM=
"
cuda
"
elif
command
-v rocminfo
>
/dev/null
;
then
PLATFORM=
"
hip
"
else
echo
"
Error: No supported GPU found
"
exit
1
fi
if
[
"
$NEW_ENV
"
=
true
]
;
then
conda create -n trellis2 python=3.10
conda activate trellis2
if
[
"
$PLATFORM
"
=
"
cuda
"
]
;
then
pip install torch==2.6.0 torchvision==0.21.0 --index-url https://download.pytorch.org/whl/cu124
elif
[
"
$PLATFORM
"
=
"
hip
"
]
;
then
pip install torch==2.6.0 torchvision==0.21.0 --index-url https://download.pytorch.org/whl/rocm6.2.4
fi
fi
if
[
"
$BASIC
"
=
true
]
;
then
pip install imageio imageio-ffmpeg tqdm easydict opencv-python-headless ninja trimesh transformers gradio==6.0.1 tensorboard pandas lpips zstandard
pip install git+https://github.com/EasternJournalist/utils3d.git@9a4eb15e4021b67b12c460c7057d642626897ec8
sudo apt install -y libjpeg-dev
pip install pillow-simd
pip install kornia timm
fi
if
[
"
$FLASHATTN
"
=
true
]
;
then
if
[
"
$PLATFORM
"
=
"
cuda
"
]
;
then
pip install flash-attn==2.7.3
elif
[
"
$PLATFORM
"
=
"
hip
"
]
;
then
echo
"
[FLASHATTN] Prebuilt binaries not found. Building from source...
"
mkdir -p /tmp/extensions
git clone --recursive https://github.com/ROCm/flash-attention.git /tmp/extensions/flash-attention
cd
/tmp/extensions/flash-attention
git checkout tags/v2.7.3-cktile
GPU_ARCHS=gfx942 python setup.py install
#
MI300 series
cd
$WORKDIR
else
echo
"
[FLASHATTN] Unsupported platform:
$PLATFORM
"
fi
fi
if
[
"
$NVDIFFRAST
"
=
true
]
;
then
if
[
"
$PLATFORM
"
=
"
cuda
"
]
;
then
mkdir -p /tmp/extensions
git clone -b v0.4.0 https://github.com/NVlabs/nvdiffrast.git /tmp/extensions/nvdiffrast
pip install /tmp/extensions/nvdiffrast --no-build-isolation
else
echo
"
[NVDIFFRAST] Unsupported platform:
$PLATFORM
"
fi
fi
if
[
"
$NVDIFFREC
"
=
true
]
;
then
if
[
"
$PLATFORM
"
=
"
cuda
"
]
;
then
mkdir -p /tmp/extensions
git clone -b renderutils https://github.com/JeffreyXiang/nvdiffrec.git /tmp/extensions/nvdiffrec
pip install /tmp/extensions/nvdiffrec --no-build-isolation
else
echo
"
[NVDIFFREC] Unsupported platform:
$PLATFORM
"
fi
fi
if
[
"
$CUMESH
"
=
true
]
;
then
mkdir -p /tmp/extensions
git clone https://github.com/JeffreyXiang/CuMesh.git /tmp/extensions/CuMesh --recursive
pip install /tmp/extensions/CuMesh --no-build-isolation
fi
if
[
"
$FLEXGEMM
"
=
true
]
;
then
mkdir -p /tmp/extensions
git clone https://github.com/JeffreyXiang/FlexGEMM.git /tmp/extensions/FlexGEMM --recursive
pip install /tmp/extensions/FlexGEMM --no-build-isolation
fi
if
[
"
$OVOXEL
"
=
true
]
;
then
mkdir -p /tmp/extensions
cp -r o-voxel /tmp/extensions/o-voxel
pip install /tmp/extensions/o-voxel --no-build-isolation
fi
You can’t perform that action at this time.