luh1124 commited on
Commit
b92b76e
Β·
1 Parent(s): 58f7431

ui: update title and description

Browse files

- Remove 'ZeroGPU Optimized' label.
- Rename to 'NeAR β€” Image-to-Relightable 3D Gaussian Splatting'.
- Update workflow description to match the 4-step split (β‘ β‘‘β‘’β‘£).
- Clean up module docstring.

Files changed (1) hide show
  1. app.py +11 -20
app.py CHANGED
@@ -1,21 +1,11 @@
1
  """
2
- NeAR Gradio Space β€” ZeroGPU-compatible pipeline (REFACTORED).
3
 
4
- ZeroGPU contract: every @spaces.GPU call gets a **fresh** CUDA context.
5
- Any CUDA-backed object (nvdiffrast renderer, tone_mapper) from a previous
6
- call is invalid in the next call.
7
 
8
- REFACTORED ARCHITECTURE:
9
- - β‘  Generate Geometry (Hunyuan3D) β€” independent GPU callback
10
- - β‘‘ Generate SLaT (NeAR) β€” independent GPU callback
11
- - β‘’β‘£ MERGED: Generate Videos + Export PBR GLB β€” SINGLE GPU callback
12
- * Avoids cross-callback CUDA context resets
13
- * Renderer/tone_mapper stay valid throughout rendering and export
14
-
15
- Session state = file paths only. No in-memory objects retained between
16
- steps (except within the unified β‘’β‘£ callback).
17
-
18
- CPU preload runs in a background daemon thread at Space startup (no GPU lease).
19
  """
20
  from __future__ import annotations
21
 
@@ -802,15 +792,16 @@ def build_app() -> gr.Blocks:
802
  import warnings
803
  with warnings.catch_warnings():
804
  warnings.simplefilter("ignore", UserWarning)
805
- _blocks_ctx = gr.Blocks(title="NeAR β€” Relightable 3D", theme=THEME, css=CSS, fill_width=True)
806
  with _blocks_ctx as demo:
807
  asset_state = gr.State({})
808
 
809
  gr.Markdown(
810
- "## NeAR β€” Relightable 3D (ZeroGPU Optimized)\n"
811
- "**β‘  Geometry** β†’ **β‘‘ SLaT** β†’ **β‘’β‘£ Videos + PBR GLB** (merged for stability)\n\n"
812
- "Tip: after generating geometry, swap the input image before running **β‘‘ SLaT** "
813
- "to apply a different texture style to the same shape β€” geometry and appearance are decoupled."
 
814
  )
815
 
816
  with gr.Row(equal_height=False):
 
1
  """
2
+ NeAR β€” Image-to-Relightable 3D Gaussian Splatting
3
 
4
+ Pipeline:
5
+ β‘  Geometry β†’ β‘‘ SLaT β†’ β‘’ Videos β†’ β‘£ PBR GLB
 
6
 
7
+ - ZeroGPU: each @spaces.GPU callback gets a fresh CUDA context.
8
+ - CPU preload: Hunyuan3D + NeAR weights warmed at container start.
 
 
 
 
 
 
 
 
 
9
  """
10
  from __future__ import annotations
11
 
 
792
  import warnings
793
  with warnings.catch_warnings():
794
  warnings.simplefilter("ignore", UserWarning)
795
+ _blocks_ctx = gr.Blocks(title="NeAR β€” Relightable 3DGS", theme=THEME, css=CSS, fill_width=True)
796
  with _blocks_ctx as demo:
797
  asset_state = gr.State({})
798
 
799
  gr.Markdown(
800
+ "## NeAR β€” Image-to-Relightable 3D Gaussian Splatting\n"
801
+ "**β‘  Geometry** β†’ **β‘‘ SLaT** β†’ **β‘’ Videos** β†’ **β‘£ PBR GLB**\n\n"
802
+ "Upload an image and walk through the four steps. "
803
+ "Geometry and appearance are decoupled β€” after step β‘  you can swap the input image "
804
+ "before step β‘‘ to retexture the same mesh with a different style."
805
  )
806
 
807
  with gr.Row(equal_height=False):