Commit
·
a3626f7
1
Parent(s):
db2fd1d
Update generate3d function to initialize nvdiffrast context using CUDA, enhancing rendering performance and compatibility with GPU devices.
Browse files- inference.py +1 -1
inference.py
CHANGED
|
@@ -21,7 +21,7 @@ def generate3d(model, rgb_image, xyz_image, device="cpu"):
|
|
| 21 |
# Get rendering context required by xatlas and nvdiffrast
|
| 22 |
try:
|
| 23 |
import nvdiffrast.torch as dr
|
| 24 |
-
ctx = dr.
|
| 25 |
except Exception as e:
|
| 26 |
raise RuntimeError("Failed to initialize nvdiffrast context: " + str(e))
|
| 27 |
|
|
|
|
| 21 |
# Get rendering context required by xatlas and nvdiffrast
|
| 22 |
try:
|
| 23 |
import nvdiffrast.torch as dr
|
| 24 |
+
ctx = dr.RasterizeCudaContext(device=device)
|
| 25 |
except Exception as e:
|
| 26 |
raise RuntimeError("Failed to initialize nvdiffrast context: " + str(e))
|
| 27 |
|