Spaces:
mashroo
/
Runtime error

YoussefAnso commited on
Commit
6b79750
·
1 Parent(s): 9efc262

Adjust resolution and remesh iterations in generate3d function for optimized output

Browse files

- Decreased the resolution from [2056, 2056] to [1024, 1024] to balance performance and quality.
- Reduced remesh iterations from 3 to 2 to streamline the mesh generation process while maintaining detail.

Files changed (1) hide show
  1. inference.py +2 -2
inference.py CHANGED
@@ -56,7 +56,7 @@ def generate3d(model, rgb, ccm, device):
56
 
57
  with torch.no_grad():
58
  data_config = {
59
- 'resolution': [2056, 2056],
60
  "triview_color": triplane_color.to(device),
61
  }
62
 
@@ -70,7 +70,7 @@ def generate3d(model, rgb, ccm, device):
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()
 
56
 
57
  with torch.no_grad():
58
  data_config = {
59
+ 'resolution': [1024, 1024],
60
  "triview_color": triplane_color.to(device),
61
  }
62
 
 
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=2
74
  )
75
  data_config['verts'] = torch.from_numpy(verts).to(device).contiguous()
76
  data_config['faces'] = torch.from_numpy(faces).to(device).contiguous()