Spaces:
Sleeping
Sleeping
kyleleey
commited on
Commit
•
66abaaa
1
Parent(s):
288ffdd
update cuda context
Browse files
app.py
CHANGED
@@ -532,7 +532,8 @@ def run_pipeline(model_items, cfgs, input_img):
|
|
532 |
nv_meshes = make_mesh(verts=bones_meshes.verts_padded(), faces=bones_meshes.faces_padded()[0:1],
|
533 |
uvs=bones_meshes.textures.verts_uvs_padded(), uv_idx=bones_meshes.textures.faces_uvs_padded()[0:1],
|
534 |
material=material_texture.Texture2D(bones_meshes.textures.maps_padded()))
|
535 |
-
buffers = render_mesh(dr.RasterizeGLContext(), nv_meshes, mvp, w2c, campos, nv_meshes.material, lgt=gray_light, feat=im_features, dino_pred=None, resolution=(256,256), bsdf="diffuse")
|
|
|
536 |
|
537 |
shaded = buffers["shaded"].permute(0, 3, 1, 2)
|
538 |
bone_image = shaded[:, :3, :, :]
|
|
|
532 |
nv_meshes = make_mesh(verts=bones_meshes.verts_padded(), faces=bones_meshes.faces_padded()[0:1],
|
533 |
uvs=bones_meshes.textures.verts_uvs_padded(), uv_idx=bones_meshes.textures.faces_uvs_padded()[0:1],
|
534 |
material=material_texture.Texture2D(bones_meshes.textures.maps_padded()))
|
535 |
+
# buffers = render_mesh(dr.RasterizeGLContext(), nv_meshes, mvp, w2c, campos, nv_meshes.material, lgt=gray_light, feat=im_features, dino_pred=None, resolution=(256,256), bsdf="diffuse")
|
536 |
+
buffers = render_mesh(dr.RasterizeCudaContext(), nv_meshes, mvp, w2c, campos, nv_meshes.material, lgt=gray_light, feat=im_features, dino_pred=None, resolution=(256,256), bsdf="diffuse")
|
537 |
|
538 |
shaded = buffers["shaded"].permute(0, 3, 1, 2)
|
539 |
bone_image = shaded[:, :3, :, :]
|