derektan commited on
Commit
9780b6e
Β·
1 Parent(s): a336540

Increased max GPU inference duration to prevent zeroGPU errors

Browse files
Taxabind/TaxaBind/SatBind/clip_seg_tta.py CHANGED
@@ -264,7 +264,7 @@ class ClipSegTTA:
264
  # print(f"Local model reset in {(time.time()-start_time):.2f}s.")
265
 
266
  # # integration with ZeroGPU on hf
267
- @spaces.GPU(duration=20)
268
  def execute_tta(
269
  self,
270
  patch_indices: list,
 
264
  # print(f"Local model reset in {(time.time()-start_time):.2f}s.")
265
 
266
  # # integration with ZeroGPU on hf
267
+ @spaces.GPU(duration=120)
268
  def execute_tta(
269
  self,
270
  patch_indices: list,
app.py CHANGED
@@ -68,7 +68,7 @@ def _kill_running_threads():
68
  _running_threads.clear()
69
 
70
  # ──────────── Run directory rotation ─────────────
71
- RUN_HISTORY_LIMIT = 20 # keep at most this many timestamped run directories per instance
72
 
73
  def _prune_old_run_dirs(base_dir: str, limit: int = RUN_HISTORY_LIMIT):
74
  """Delete oldest timestamp-named run directories leaving only *limit* of the newest ones."""
 
68
  _running_threads.clear()
69
 
70
  # ──────────── Run directory rotation ─────────────
71
+ RUN_HISTORY_LIMIT = 30 # keep at most this many timestamped run directories per instance
72
 
73
  def _prune_old_run_dirs(base_dir: str, limit: int = RUN_HISTORY_LIMIT):
74
  """Delete oldest timestamp-named run directories leaving only *limit* of the newest ones."""