haodongli commited on
Commit
3f05732
·
1 Parent(s): 0d474a2

Update gradio_demo.py

Browse files
Files changed (1) hide show
  1. gradio_demo.py +11 -13
gradio_demo.py CHANGED
@@ -2,19 +2,17 @@ import gradio as gr
2
  import numpy as np
3
  import os
4
 
5
- # if os.environ.get('SUBMODULES_INSTALLED') != "True":
6
- # os.environ['SUBMODULES_INSTALLED'] = "True"
7
- # # https://github.com/pytorch/extension-cpp/issues/71
8
- # os.environ["TORCH_CUDA_ARCH_LIST"] = "3.5;5.0;6.0;6.1;7.0;7.5;8.0;8.6+PTX"
9
- # print('==> TORCH_CUDA_ARCH_LIST =', os.environ.get('TORCH_CUDA_ARCH_LIST'))
10
- # os.system("python -m pip install git+https://github.com/YixunLiang/simple-knn.git")
11
- # print('==> simple-knn installed!')
12
- # os.system("python -m pip install git+https://github.com/YixunLiang/diff-gaussian-rasterization.git")
13
- # print('==> diff-gaussian-rasterization installed!')
14
- # else:
15
- # print('==> simple-knn & diff-gaussian-rasterization already installed!')
16
-
17
- from train import *
18
 
19
  example_inputs = [[
20
  "A DSLR photo of a Rugged, vintage-inspired hiking boots with a weathered leather finish, best quality, 4K, HD.",
 
2
  import numpy as np
3
  import os
4
 
5
+ try:
6
+ from train import *
7
+ print('==> simple-knn & diff-gaussian-rasterization already installed!')
8
+ except:
9
+ # https://github.com/pytorch/extension-cpp/issues/71
10
+ os.environ["TORCH_CUDA_ARCH_LIST"] = "3.5;5.0;6.0;6.1;7.0;7.5;8.0;8.6+PTX"
11
+ print('==> TORCH_CUDA_ARCH_LIST =', os.environ.get('TORCH_CUDA_ARCH_LIST'))
12
+ os.system("python -m pip install git+https://github.com/YixunLiang/simple-knn.git")
13
+ print('==> simple-knn installed!')
14
+ os.system("python -m pip install git+https://github.com/YixunLiang/diff-gaussian-rasterization.git")
15
+ print('==> diff-gaussian-rasterization installed!')
 
 
16
 
17
  example_inputs = [[
18
  "A DSLR photo of a Rugged, vintage-inspired hiking boots with a weathered leather finish, best quality, 4K, HD.",