Commit
·
5175c4e
1
Parent(s):
9a3d596
Update remesh iterations and device handling in generate3d function
Browse files- Increased remesh iterations from 1 to 3 to enhance mesh quality during generation.
- Updated tensor transfer to use the specified device instead of defaulting to CUDA, improving flexibility for different hardware configurations.
- inference.py +7 -3
inference.py
CHANGED
@@ -67,9 +67,13 @@ def generate3d(model, rgb, ccm, device):
|
|
67 |
|
68 |
|
69 |
from kiui.mesh_utils import clean_mesh
|
70 |
-
verts, faces = clean_mesh(
|
71 |
-
|
72 |
-
|
|
|
|
|
|
|
|
|
73 |
|
74 |
start_time = time.time()
|
75 |
with torch.no_grad():
|
|
|
67 |
|
68 |
|
69 |
from kiui.mesh_utils import clean_mesh
|
70 |
+
verts, faces = clean_mesh(
|
71 |
+
data_config['verts'].squeeze().cpu().numpy().astype(np.float32),
|
72 |
+
data_config['faces'].squeeze().cpu().numpy().astype(np.int32),
|
73 |
+
repair=False, remesh=True, remesh_size=0.005, remesh_iters=3
|
74 |
+
)
|
75 |
+
data_config['verts'] = torch.from_numpy(verts).to(device).contiguous()
|
76 |
+
data_config['faces'] = torch.from_numpy(faces).to(device).contiguous()
|
77 |
|
78 |
start_time = time.time()
|
79 |
with torch.no_grad():
|