Spaces:
ahadi
/
Build error

jyseo commited on
Commit
bd359dc
1 Parent(s): 2861bad

demo fixed

Browse files
Files changed (3) hide show
  1. gradio_app.py → app.py +15 -0
  2. requirements.txt +1 -0
  3. run_3DFuse.py +2 -2
gradio_app.py → app.py RENAMED
@@ -13,6 +13,7 @@ import numpy as np
13
  import plotly.graph_objs as go
14
  from my.utils.seed import seed_everything
15
  import os
 
16
 
17
  SHARED_UI_WARNING = f'''### [NOTE] Training may be very slow in this shared UI.
18
  You can duplicate and use it with a paid private GPU.
@@ -228,6 +229,20 @@ if __name__ == '__main__':
228
  parser = argparse.ArgumentParser()
229
  parser.add_argument('--share', action='store_true', help="public url")
230
  args = parser.parse_args()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
231
 
232
  model = None
233
  intermediate = Intermediate()
 
13
  import plotly.graph_objs as go
14
  from my.utils.seed import seed_everything
15
  import os
16
+ import wget
17
 
18
  SHARED_UI_WARNING = f'''### [NOTE] Training may be very slow in this shared UI.
19
  You can duplicate and use it with a paid private GPU.
 
229
  parser = argparse.ArgumentParser()
230
  parser.add_argument('--share', action='store_true', help="public url")
231
  args = parser.parse_args()
232
+
233
+ weights_dir = './weights'
234
+ if not os.path.exists(weights_dir):
235
+ os.makedirs(weights_dir)
236
+ weights_path = os.path.join(weights_dir, '3DFuse_sparse_depth_injector.ckpt')
237
+
238
+ # 파일이 존재하지 않으면 wget으로 다운로드하여 저장
239
+ if not os.path.isfile(weights_path):
240
+ url = 'https://huggingface.co/jyseo/3DFuse_weights/resolve/main/models/3DFuse_sparse_depth_injector.ckpt'
241
+ wget.download(url, weights_path)
242
+ print(f'{weights_path} downloaded.')
243
+ else:
244
+ print(f'{weights_path} already exists.')
245
+
246
 
247
  model = None
248
  intermediate = Intermediate()
requirements.txt CHANGED
@@ -26,6 +26,7 @@ click
26
  easydict
27
  tabulate
28
  plotly
 
29
  git+https://github.com/openai/point-e
30
  git+https://github.com/huggingface/diffusers
31
  git+https://github.com/cloneofsimo/lora.git
 
26
  easydict
27
  tabulate
28
  plotly
29
+ wget
30
  git+https://github.com/openai/point-e
31
  git+https://github.com/huggingface/diffusers
32
  git+https://github.com/cloneofsimo/lora.git
run_3DFuse.py CHANGED
@@ -116,7 +116,7 @@ def fuse_3d(
116
  depth_weight, var_red, exp_dir, points, is_gradio, **kwargs
117
  ):
118
  del kwargs
119
-
120
  if is_gradio:
121
  yield gr.update(visible=True), "LoRA layers tuning has just finished. \nScore distillation has started.", gr.update(visible=True)
122
  assert model.samps_centered()
@@ -230,7 +230,7 @@ def fuse_3d(
230
  out=evaluate(model, vox, poser)
231
 
232
  if is_gradio:
233
- yield gr.update(visible=True), f"Generation complete. Please check the video below. \nThe result files and logs are located at {exp_dir}", gr.update(value=out)
234
  else :
235
  yield None
236
 
 
116
  depth_weight, var_red, exp_dir, points, is_gradio, **kwargs
117
  ):
118
  del kwargs
119
+
120
  if is_gradio:
121
  yield gr.update(visible=True), "LoRA layers tuning has just finished. \nScore distillation has started.", gr.update(visible=True)
122
  assert model.samps_centered()
 
230
  out=evaluate(model, vox, poser)
231
 
232
  if is_gradio:
233
+ yield gr.update(visible=False), f"Generation complete. Please check the video below.", gr.update(value=out)
234
  else :
235
  yield None
236