Commit
·
b6dcd98
1
Parent(s):
7391a72
Refactor device handling in generate3d function to use CPU instead of CUDA for mesh processing, ensuring compatibility with non-GPU environments. This change improves flexibility in data handling and maintains the integrity of the mesh generation process.
Browse files- inference.py +2 -2
inference.py
CHANGED
@@ -57,8 +57,8 @@ def generate3d(model, rgb, ccm, device):
|
|
57 |
|
58 |
from kiui.mesh_utils import clean_mesh
|
59 |
verts, faces = clean_mesh(
|
60 |
-
data_config['verts'].squeeze().
|
61 |
-
data_config['faces'].squeeze().
|
62 |
repair=False, remesh=True, remesh_size=0.005, remesh_iters=1
|
63 |
)
|
64 |
data_config['verts'] = torch.from_numpy(verts).to(device).contiguous()
|
|
|
57 |
|
58 |
from kiui.mesh_utils import clean_mesh
|
59 |
verts, faces = clean_mesh(
|
60 |
+
data_config['verts'].squeeze().cpu().numpy().astype(np.float32),
|
61 |
+
data_config['faces'].squeeze().cpu().numpy().astype(np.int32),
|
62 |
repair=False, remesh=True, remesh_size=0.005, remesh_iters=1
|
63 |
)
|
64 |
data_config['verts'] = torch.from_numpy(verts).to(device).contiguous()
|