Update models/ISOMER/mesh_reconstruction/render.py
Browse files
models/ISOMER/mesh_reconstruction/render.py
CHANGED
@@ -11,7 +11,9 @@ def init_render():
|
|
11 |
glctx = dr.RasterizeCudaContext(device="cuda")
|
12 |
init_render()
|
13 |
|
|
|
14 |
def _warmup(glctx, device=None):
|
|
|
15 |
device = 'cuda' if device is None else device
|
16 |
#windows workaround for https://github.com/NVlabs/nvdiffrast/issues/59
|
17 |
def tensor(*args, **kwargs):
|
|
|
11 |
glctx = dr.RasterizeCudaContext(device="cuda")
|
12 |
init_render()
|
13 |
|
14 |
+
@spaces.GPU
|
15 |
def _warmup(glctx, device=None):
|
16 |
+
global glctx
|
17 |
device = 'cuda' if device is None else device
|
18 |
#windows workaround for https://github.com/NVlabs/nvdiffrast/issues/59
|
19 |
def tensor(*args, **kwargs):
|