Reverb commited on
Commit
5dad3a0
·
1 Parent(s): 851bece

Fix ZeroGPU proxy token expiry: single GPU allocation for full pipeline

Browse files

Individual @spaces.GPU decorators on each baking stage caused the proxy
token (tied to the original Gradio request) to expire by the time material
and AO baking ran. Fix: remove per-stage decorators and put a single
@spaces.GPU(duration=600) on run_post_process so all baking happens within
one uninterrupted GPU allocation.

Files changed (2) hide show
  1. app.py +1 -0
  2. src/stages/stage2_bake_normal.py +1 -1
app.py CHANGED
@@ -239,6 +239,7 @@ def handle_generate(images, model, quality, seed, _steps, _octree, tex_size, _sy
239
  yield from generate_hunyuan(images, quality, int(seed), int(tex_size), do_rembg=bool(do_rembg))
240
 
241
 
 
242
  def run_post_process(
243
  do_repair, do_cleanup, do_decimate, target_faces,
244
  do_symmetry, do_unwrap, do_normal_bake, normal_format,
 
239
  yield from generate_hunyuan(images, quality, int(seed), int(tex_size), do_rembg=bool(do_rembg))
240
 
241
 
242
+ @spaces.GPU(duration=600)
243
  def run_post_process(
244
  do_repair, do_cleanup, do_decimate, target_faces,
245
  do_symmetry, do_unwrap, do_normal_bake, normal_format,
src/stages/stage2_bake_normal.py CHANGED
@@ -76,7 +76,7 @@ def _dilate(img: np.ndarray, mask: np.ndarray, iterations: int = 8) -> np.ndarra
76
  # GPU bake
77
  # ---------------------------------------------------------------------------
78
 
79
- @spaces.GPU(duration=120)
80
  def bake_normal_map(
81
  high_poly_path: Path,
82
  unwrapped_glb_path: Path,
 
76
  # GPU bake
77
  # ---------------------------------------------------------------------------
78
 
79
+
80
  def bake_normal_map(
81
  high_poly_path: Path,
82
  unwrapped_glb_path: Path,