1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 23:14:49 +08:00

A few fixes for the hunyuan3d models.

This commit is contained in:
comfyanonymous
2025-03-20 04:52:31 -04:00
parent 32ca0805b7
commit 3872b43d4b
3 changed files with 11 additions and 4 deletions

View File

@@ -190,8 +190,12 @@ def voxel_to_mesh(voxels, threshold=0.5, device=None):
vertex_count += 4 * num_faces
vertices = torch.cat(all_vertices, dim=0)
faces = torch.cat(all_indices, dim=0)
if len(all_vertices) > 0:
vertices = torch.cat(all_vertices, dim=0)
faces = torch.cat(all_indices, dim=0)
else:
vertices = torch.zeros((1, 3))
faces = torch.zeros((1, 3))
v_min = 0
v_max = max(voxels.shape)