Spaces:
Runtime error
Runtime error
update
Browse files- refine/func.py +1 -1
- refine/render.py +2 -2
refine/func.py
CHANGED
|
@@ -134,7 +134,7 @@ def from_py3d_mesh(mesh):
|
|
| 134 |
|
| 135 |
class Pix2FacesRenderer:
|
| 136 |
def __init__(self, device="cuda"):
|
| 137 |
-
self._glctx = dr.
|
| 138 |
self.device = device
|
| 139 |
_warmup(self._glctx, device)
|
| 140 |
|
|
|
|
| 134 |
|
| 135 |
class Pix2FacesRenderer:
|
| 136 |
def __init__(self, device="cuda"):
|
| 137 |
+
self._glctx = dr.RasterizeGLContext(device=device)
|
| 138 |
self.device = device
|
| 139 |
_warmup(self._glctx, device)
|
| 140 |
|
refine/render.py
CHANGED
|
@@ -14,11 +14,11 @@ def _warmup(glctx, device=None):
|
|
| 14 |
tri = tensor([[0, 1, 2]], dtype=torch.int32)
|
| 15 |
dr.rasterize(glctx, pos, tri, resolution=[256, 256])
|
| 16 |
|
| 17 |
-
glctx = dr.
|
| 18 |
|
| 19 |
class NormalsRenderer:
|
| 20 |
|
| 21 |
-
_glctx:dr.
|
| 22 |
|
| 23 |
def __init__(
|
| 24 |
self,
|
|
|
|
| 14 |
tri = tensor([[0, 1, 2]], dtype=torch.int32)
|
| 15 |
dr.rasterize(glctx, pos, tri, resolution=[256, 256])
|
| 16 |
|
| 17 |
+
glctx = dr.RasterizeGLContext(device="cuda")
|
| 18 |
|
| 19 |
class NormalsRenderer:
|
| 20 |
|
| 21 |
+
_glctx:dr.RasterizeGLContext = None
|
| 22 |
|
| 23 |
def __init__(
|
| 24 |
self,
|