crevelop commited on
Commit
1dd580d
·
unverified ·
1 Parent(s): f56018c

Revert "more logs to find missing fbx"

Browse files

This reverts commit 83e054a1f07fc68fde59fb62900a7bed5d0b1bc0.

Files changed (2) hide show
  1. app.py +0 -1
  2. src/system/ar.py +2 -11
app.py CHANGED
@@ -192,7 +192,6 @@ def run_inference_python(
192
  writer_config['output_dir'] = str(Path(output_file).parent)
193
  writer_config['output_name'] = Path(output_file).name
194
  writer_config['user_mode'] = False # Enable NPZ export for skeleton
195
- print(f"Writer config for skeleton: {writer_config}")
196
  else: # skin
197
  writer_config['npz_dir'] = str(skeleton_npz_dir)
198
  writer_config['output_name'] = str(output_file)
 
192
  writer_config['output_dir'] = str(Path(output_file).parent)
193
  writer_config['output_name'] = Path(output_file).name
194
  writer_config['user_mode'] = False # Enable NPZ export for skeleton
 
195
  else: # skin
196
  writer_config['npz_dir'] = str(skeleton_npz_dir)
197
  writer_config['output_name'] = str(output_file)
src/system/ar.py CHANGED
@@ -88,11 +88,9 @@ class ARWriter(BasePredictionWriter):
88
  trainer.predict_loop.run()
89
 
90
  def write_on_batch_end(self, trainer, pl_module: ARSystem, prediction: List[Dict], batch_indices, batch, batch_idx, dataloader_idx):
91
- print(f"ARWriter.write_on_batch_end called with {len(prediction)} predictions")
92
  assert 'path' in batch
93
  paths = batch['path']
94
  detokenize_output_list: List[DetokenizeOutput] = prediction
95
- print(f"Processing {len(detokenize_output_list)} detokenize outputs")
96
  vertices = batch['vertices']
97
 
98
  origin_vertices = batch['origin_vertices']
@@ -116,7 +114,6 @@ class ARWriter(BasePredictionWriter):
116
  num_faces = num_faces.detach().cpu().numpy()
117
 
118
  for (id, detokenize_output) in enumerate(detokenize_output_list):
119
- print(f"Processing detokenize output {id}: {type(detokenize_output)}")
120
  assert isinstance(detokenize_output, DetokenizeOutput), f"expect item of the list to be DetokenizeOutput, found: {type(detokenize_output)}"
121
  def make_path(save_name: str, suffix: str, trim: bool=False):
122
  if trim:
@@ -160,15 +157,9 @@ class ARWriter(BasePredictionWriter):
160
  raw_data.export_pc(path=make_path(self.export_pc, 'obj'))
161
  if self.export_fbx is not None:
162
  if not self.user_mode:
163
- fbx_path = make_path(self.export_fbx, 'fbx')
164
- print(f"ARWriter: Exporting FBX to {fbx_path}")
165
- raw_data.export_fbx(path=fbx_path)
166
- print(f"ARWriter: FBX export completed for {fbx_path}")
167
  else:
168
  if self.output_name is not None:
169
- print(f"ARWriter: Exporting FBX to {self.output_name} (user mode)")
170
  raw_data.export_fbx(path=self.output_name)
171
  else:
172
- fbx_path = make_path(self.export_fbx, 'fbx', trim=True)
173
- print(f"ARWriter: Exporting FBX to {fbx_path} (user mode, trim)")
174
- raw_data.export_fbx(path=fbx_path)
 
88
  trainer.predict_loop.run()
89
 
90
  def write_on_batch_end(self, trainer, pl_module: ARSystem, prediction: List[Dict], batch_indices, batch, batch_idx, dataloader_idx):
 
91
  assert 'path' in batch
92
  paths = batch['path']
93
  detokenize_output_list: List[DetokenizeOutput] = prediction
 
94
  vertices = batch['vertices']
95
 
96
  origin_vertices = batch['origin_vertices']
 
114
  num_faces = num_faces.detach().cpu().numpy()
115
 
116
  for (id, detokenize_output) in enumerate(detokenize_output_list):
 
117
  assert isinstance(detokenize_output, DetokenizeOutput), f"expect item of the list to be DetokenizeOutput, found: {type(detokenize_output)}"
118
  def make_path(save_name: str, suffix: str, trim: bool=False):
119
  if trim:
 
157
  raw_data.export_pc(path=make_path(self.export_pc, 'obj'))
158
  if self.export_fbx is not None:
159
  if not self.user_mode:
160
+ raw_data.export_fbx(path=make_path(self.export_fbx, 'fbx'))
 
 
 
161
  else:
162
  if self.output_name is not None:
 
163
  raw_data.export_fbx(path=self.output_name)
164
  else:
165
+ raw_data.export_fbx(path=make_path(self.export_fbx, 'fbx', trim=True))