staswrs commited on
Commit
b3806ac
·
1 Parent(s): f5c913b

octree_depth all 9

Browse files
inference_triposg.py CHANGED
@@ -73,7 +73,7 @@ def run_triposg(
73
 
74
  if faces > 0:
75
  print(f"[DEBUG] Simplifying mesh to {faces} faces")
76
- mesh = simplify_mesh(mesh, faces)
77
 
78
  return mesh
79
 
 
73
 
74
  if faces > 0:
75
  print(f"[DEBUG] Simplifying mesh to {faces} faces")
76
+ # mesh = simplify_mesh(mesh, faces)
77
 
78
  return mesh
79
 
scripts/inference_triposg_scribble.py CHANGED
@@ -37,7 +37,7 @@ def run_triposg_scribble(
37
  guidance_scale=0, # this is a CFG-distilled model
38
  attention_kwargs={"cross_attention_scale": prompt_confidence, "cross_attention_2_scale": scribble_confidence},
39
  use_flash_decoder=False, # there're some boundary problems when using flash decoder with this model
40
- dense_octree_depth=8, hierarchical_octree_depth=8 # 256 resolution for faster inference
41
  ).samples[0]
42
  mesh = trimesh.Trimesh(outputs[0].astype(np.float32), np.ascontiguousarray(outputs[1]))
43
  return mesh
 
37
  guidance_scale=0, # this is a CFG-distilled model
38
  attention_kwargs={"cross_attention_scale": prompt_confidence, "cross_attention_2_scale": scribble_confidence},
39
  use_flash_decoder=False, # there're some boundary problems when using flash decoder with this model
40
+ dense_octree_depth=9, hierarchical_octree_depth=9 # 256 resolution for faster inference
41
  ).samples[0]
42
  mesh = trimesh.Trimesh(outputs[0].astype(np.float32), np.ascontiguousarray(outputs[1]))
43
  return mesh
scripts/inference_vae.py CHANGED
@@ -52,7 +52,7 @@ if __name__ == "__main__":
52
  geometric_func,
53
  device,
54
  bounds=(-1.005, -1.005, -1.005, 1.005, 1.005, 1.005),
55
- dense_octree_depth=8,
56
  hierarchical_octree_depth=9,
57
  )
58
  meshes = [trimesh.Trimesh(mesh_v_f[0].astype(np.float32), mesh_v_f[1]) for mesh_v_f in output]
 
52
  geometric_func,
53
  device,
54
  bounds=(-1.005, -1.005, -1.005, 1.005, 1.005, 1.005),
55
+ dense_octree_depth=9,
56
  hierarchical_octree_depth=9,
57
  )
58
  meshes = [trimesh.Trimesh(mesh_v_f[0].astype(np.float32), mesh_v_f[1]) for mesh_v_f in output]
triposg/inference_utils.py CHANGED
@@ -128,7 +128,7 @@ def parallel_zoom(occupancy_grid, scale_factor):
128
  def hierarchical_extract_geometry(geometric_func: Callable,
129
  device: torch.device,
130
  bounds: Union[Tuple[float], List[float], float] = (-1.25, -1.25, -1.25, 1.25, 1.25, 1.25),
131
- dense_octree_depth: int = 8,
132
  hierarchical_octree_depth: int = 9,
133
  ):
134
  """
 
128
  def hierarchical_extract_geometry(geometric_func: Callable,
129
  device: torch.device,
130
  bounds: Union[Tuple[float], List[float], float] = (-1.25, -1.25, -1.25, 1.25, 1.25, 1.25),
131
+ dense_octree_depth: int = 9,
132
  hierarchical_octree_depth: int = 9,
133
  ):
134
  """
triposg/pipelines/pipeline_triposg_scribble.py CHANGED
@@ -200,7 +200,7 @@ class TripoSGScribblePipeline(DiffusionPipeline, TransformerDiffusionMixin):
200
  callback_on_step_end: Optional[Callable[[int, int, Dict], None]] = None,
201
  callback_on_step_end_tensor_inputs: List[str] = ["latents"],
202
  bounds: Union[Tuple[float], List[float], float] = (-1.005, -1.005, -1.005, 1.005, 1.005, 1.005),
203
- dense_octree_depth: int = 8,
204
  hierarchical_octree_depth: int = 9,
205
  flash_octree_depth: int = 9,
206
  use_flash_decoder: bool = True,
 
200
  callback_on_step_end: Optional[Callable[[int, int, Dict], None]] = None,
201
  callback_on_step_end_tensor_inputs: List[str] = ["latents"],
202
  bounds: Union[Tuple[float], List[float], float] = (-1.005, -1.005, -1.005, 1.005, 1.005, 1.005),
203
+ dense_octree_depth: int = 9,
204
  hierarchical_octree_depth: int = 9,
205
  flash_octree_depth: int = 9,
206
  use_flash_decoder: bool = True,