John6666 commited on
Commit
d8fe5dd
·
verified ·
1 Parent(s): c6b110c

Upload 2 files

Browse files
Files changed (2) hide show
  1. app.py +4 -3
  2. requirements.txt +2 -1
app.py CHANGED
@@ -107,7 +107,7 @@ def explode_mesh(mesh: trimesh.Scene, explode_factor: float = 0.5):
107
  return exploded_mesh
108
 
109
 
110
- @spaces.GPU(duration=600)
111
  def run_full(data_path, seed=42, num_inference_steps=25, guidance_scale=3.5):
112
 
113
  batch_size = 30
@@ -138,7 +138,7 @@ def run_full(data_path, seed=42, num_inference_steps=25, guidance_scale=3.5):
138
  return mesh_path, exploded_mesh_path
139
 
140
 
141
- @spaces.GPU(duration=600)
142
  def run_example(data_path: str, example_image_path, seed=42, num_inference_steps=25, guidance_scale=3.5):
143
 
144
  batch_size = 30
@@ -223,6 +223,7 @@ with gr.Blocks(title="HoloPart") as demo:
223
  inputs=[input_mesh, example_image],
224
  outputs=[model_output, exploded_parts_output],
225
  cache_examples=True,
 
226
  )
227
 
228
 
@@ -240,4 +241,4 @@ with gr.Blocks(title="HoloPart") as demo:
240
  demo.load(start_session)
241
  demo.unload(end_session)
242
 
243
- demo.launch()
 
107
  return exploded_mesh
108
 
109
 
110
+ @spaces.GPU(duration=300)
111
  def run_full(data_path, seed=42, num_inference_steps=25, guidance_scale=3.5):
112
 
113
  batch_size = 30
 
138
  return mesh_path, exploded_mesh_path
139
 
140
 
141
+ @spaces.GPU(duration=300)
142
  def run_example(data_path: str, example_image_path, seed=42, num_inference_steps=25, guidance_scale=3.5):
143
 
144
  batch_size = 30
 
223
  inputs=[input_mesh, example_image],
224
  outputs=[model_output, exploded_parts_output],
225
  cache_examples=True,
226
+ cache_mode="lazy",
227
  )
228
 
229
 
 
241
  demo.load(start_session)
242
  demo.unload(end_session)
243
 
244
+ demo.launch(ssr_mode=False, allowed_paths=["./tmp/"])
requirements.txt CHANGED
@@ -1,3 +1,4 @@
 
1
  torchvision
2
  diffusers
3
  transformers==4.49.0
@@ -21,5 +22,5 @@ https://huggingface.co/spaces/JeffreyXiang/TRELLIS/resolve/main/wheels/nvdiffras
21
  cvcuda_cu12
22
  gltflib
23
  https://huggingface.co/spaces/VAST-AI/TripoSG/resolve/main/diso-0.1.4-cp310-cp310-linux_x86_64.whl?download=true
24
- --find-links https://data.pyg.org/whl/torch-2.6.0+cu124.html
25
  torch-cluster
 
1
+ torch==2.4.0
2
  torchvision
3
  diffusers
4
  transformers==4.49.0
 
22
  cvcuda_cu12
23
  gltflib
24
  https://huggingface.co/spaces/VAST-AI/TripoSG/resolve/main/diso-0.1.4-cp310-cp310-linux_x86_64.whl?download=true
25
+ --find-links https://data.pyg.org/whl/torch-2.4.0+cu124.html
26
  torch-cluster