alexnasa commited on
Commit
66cac5e
·
verified ·
1 Parent(s): 3b8b123

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -10,6 +10,7 @@ import gradio as gr
10
  import sys
11
  from PIL import Image
12
  import importlib, site, sys
 
13
 
14
  # Re-discover all .pth/.egg-link files
15
  for sitedir in site.getsitepackages():
@@ -71,6 +72,8 @@ from omegaconf import OmegaConf
71
 
72
  DEVICE = "cuda"
73
 
 
 
74
  base_conf = OmegaConf.load(f'{env_paths.CODE_BASE}/configs/tracking.yaml')
75
 
76
  _mesh_file = env_paths.head_template
@@ -82,7 +85,8 @@ diff_renderer = NVDRenderer(
82
  image_size=base_conf.size,
83
  obj_filename=_mesh_file,
84
  no_sh=False,
85
- white_bg=True
 
86
  ).to(DEVICE)
87
 
88
 
 
10
  import sys
11
  from PIL import Image
12
  import importlib, site, sys
13
+ import nvdiffrast.torch as dr
14
 
15
  # Re-discover all .pth/.egg-link files
16
  for sitedir in site.getsitepackages():
 
72
 
73
  DEVICE = "cuda"
74
 
75
+ rasterizer = dr.RasterizeCudaContext()
76
+
77
  base_conf = OmegaConf.load(f'{env_paths.CODE_BASE}/configs/tracking.yaml')
78
 
79
  _mesh_file = env_paths.head_template
 
85
  image_size=base_conf.size,
86
  obj_filename=_mesh_file,
87
  no_sh=False,
88
+ white_bg=True,
89
+ glctx=rasterizer
90
  ).to(DEVICE)
91
 
92