JiantaoLin commited on
Commit
819ce30
Β·
1 Parent(s): c9c26bc
Files changed (1) hide show
  1. app.py +27 -30
app.py CHANGED
@@ -26,36 +26,6 @@ subprocess.run(
26
  "pip install ./extension/renderutils_plugin-0.1.0-cp310-cp310-linux_x86_64.whl --force-reinstall --no-deps"
27
  )
28
  )
29
-
30
- import base64
31
- import re
32
- import sys
33
-
34
- from models.ISOMER.scripts.utils import fix_vert_color_glb
35
-
36
- sys.path.append(os.path.abspath(os.path.join(__file__, '../')))
37
- if 'OMP_NUM_THREADS' not in os.environ:
38
- os.environ['OMP_NUM_THREADS'] = '32'
39
-
40
- import shutil
41
- import torch
42
- import json
43
- import requests
44
- import shutil
45
- import threading
46
- from PIL import Image
47
- import time
48
- torch.backends.cuda.matmul.allow_tf32 = True
49
- import trimesh
50
-
51
- import random
52
- import time
53
- import numpy as np
54
- from video_render import render_video_from_obj
55
-
56
- access_token = os.getenv("HUGGINGFACE_TOKEN")
57
-
58
-
59
  # download cudatoolkit
60
  def install_cuda_toolkit():
61
  # CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run"
@@ -94,6 +64,33 @@ def check_gpu():
94
  print(f"torch.cuda.is_available:{torch.cuda.is_available()}")
95
  check_gpu()
96
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  from pipeline.kiss3d_wrapper import init_wrapper_from_config, run_text_to_3d, run_image_to_3d, image2mesh_preprocess, image2mesh_main
98
 
99
  is_running = False
 
26
  "pip install ./extension/renderutils_plugin-0.1.0-cp310-cp310-linux_x86_64.whl --force-reinstall --no-deps"
27
  )
28
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  # download cudatoolkit
30
  def install_cuda_toolkit():
31
  # CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run"
 
64
  print(f"torch.cuda.is_available:{torch.cuda.is_available()}")
65
  check_gpu()
66
 
67
+ import base64
68
+ import re
69
+ import sys
70
+
71
+ from models.ISOMER.scripts.utils import fix_vert_color_glb
72
+
73
+ sys.path.append(os.path.abspath(os.path.join(__file__, '../')))
74
+ if 'OMP_NUM_THREADS' not in os.environ:
75
+ os.environ['OMP_NUM_THREADS'] = '32'
76
+
77
+ import shutil
78
+ import torch
79
+ import json
80
+ import requests
81
+ import shutil
82
+ import threading
83
+ from PIL import Image
84
+ import time
85
+ torch.backends.cuda.matmul.allow_tf32 = True
86
+ import trimesh
87
+
88
+ import random
89
+ import time
90
+ import numpy as np
91
+ from video_render import render_video_from_obj
92
+
93
+ access_token = os.getenv("HUGGINGFACE_TOKEN")
94
  from pipeline.kiss3d_wrapper import init_wrapper_from_config, run_text_to_3d, run_image_to_3d, image2mesh_preprocess, image2mesh_main
95
 
96
  is_running = False