vibs08 commited on
Commit
5549457
·
verified ·
1 Parent(s): d09a288

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -32,13 +32,18 @@ subprocess.run(shlex.split('pip install wheel/torchmcubes-0.1.0-cp310-cp310-linu
32
  from tsr.system import TSR
33
  from tsr.utils import remove_background, resize_foreground, to_gradio_3d_orientation
34
 
 
35
 
36
  HEADER = """FRAME AI"""
37
 
38
- if torch.cuda.is_available():
39
- device = "cuda:1"
40
- else:
41
- device = "cpu"
 
 
 
 
42
 
43
  model = TSR.from_pretrained(
44
  "stabilityai/TripoSR",
 
32
  from tsr.system import TSR
33
  from tsr.utils import remove_background, resize_foreground, to_gradio_3d_orientation
34
 
35
+ os.environ["CUDA_VISIBLE_DEVICES"] = "1"
36
 
37
  HEADER = """FRAME AI"""
38
 
39
+ # if torch.cuda.is_available():
40
+ # device = "cuda:0"
41
+ # else:
42
+ # device = "cpu"
43
+
44
+ # torch.cuda.set_device(1)
45
+
46
+ CUDA_LAUNCH_BLOCKING=1
47
 
48
  model = TSR.from_pretrained(
49
  "stabilityai/TripoSR",