multimodalart HF Staff commited on
Commit
eceb8db
·
verified ·
1 Parent(s): 4e72893

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -105,9 +105,10 @@ def _info_line(stats: dict, seconds: float) -> str:
105
  # GPU worker (ZeroGPU)
106
  # --------------------------------------------------------------------------- #
107
  def _gpu_duration(*_args, **_kwargs) -> int:
108
- """One 512 px view of <=20k Gaussians is ~1 s of GPU time on this hardware; the reservation
109
- also has to cover a cold worker (780 MB of weights streamed in) after a reboot."""
110
- return 60
 
111
 
112
 
113
  @spaces.GPU(duration=_gpu_duration)
@@ -186,7 +187,7 @@ def render_upload(
186
  # --------------------------------------------------------------------------- #
187
  CSS = "#col-container { max-width: 1180px; margin: 0 auto; } .dark .gradio-container { color: var(--body-text-color); }"
188
 
189
- with gr.Blocks(theme=gr.themes.Citrus(), css=CSS) as demo:
190
  with gr.Column(elem_id="col-container"):
191
  gr.Markdown(
192
  "# GaussianRenderFormer\n"
@@ -215,7 +216,7 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=CSS) as demo:
215
  gr.Examples(
216
  examples=[
217
  ["Gem", 35, 20, 1.7],
218
- ["Vase", 210, -5, 1.15],
219
  ["Planet", 120, 35, 2.45],
220
  ],
221
  inputs=[scene, azimuth, elevation, distance],
@@ -265,4 +266,4 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=CSS) as demo:
265
  [up_img, up_info], api_name="render_splat")
266
 
267
  if __name__ == "__main__":
268
- demo.launch(mcp_server=True, show_error=True)
 
105
  # GPU worker (ZeroGPU)
106
  # --------------------------------------------------------------------------- #
107
  def _gpu_duration(*_args, **_kwargs) -> int:
108
+ """One 512 px view of <=20k Gaussians takes ~0.3-1.3 s measured on this hardware. The
109
+ reservation is padded to cover a cold worker after a reboot (780 MB of weights must be
110
+ streamed in before the first render, which also pays an autotune + CUDA init)."""
111
+ return 15
112
 
113
 
114
  @spaces.GPU(duration=_gpu_duration)
 
187
  # --------------------------------------------------------------------------- #
188
  CSS = "#col-container { max-width: 1180px; margin: 0 auto; } .dark .gradio-container { color: var(--body-text-color); }"
189
 
190
+ with gr.Blocks() as demo:
191
  with gr.Column(elem_id="col-container"):
192
  gr.Markdown(
193
  "# GaussianRenderFormer\n"
 
216
  gr.Examples(
217
  examples=[
218
  ["Gem", 35, 20, 1.7],
219
+ ["Vase", 210, -5, 1.45],
220
  ["Planet", 120, 35, 2.45],
221
  ],
222
  inputs=[scene, azimuth, elevation, distance],
 
266
  [up_img, up_info], api_name="render_splat")
267
 
268
  if __name__ == "__main__":
269
+ demo.launch(theme=gr.themes.Citrus(), css=CSS, mcp_server=True, show_error=True)