tddandroid commited on
Commit
99a0f5b
·
verified ·
1 Parent(s): c4bbc97

SadTalker: shrink GPU window to 100s to fit the free quota pool

Browse files
Files changed (1) hide show
  1. talking.py +2 -2
talking.py CHANGED
@@ -136,7 +136,7 @@ def ensure_talking():
136
  return str(src_root)
137
 
138
 
139
- @spaces.GPU(duration=120)
140
  def sadtalker_gpu(image_path, audio_path, out_path):
141
  """Run SadTalker inference in the vendored child process. The child must
142
  see the GPU ZeroGPU attached for this call — probed first so a subprocess
@@ -156,7 +156,7 @@ def sadtalker_gpu(image_path, audio_path, out_path):
156
  "--result_dir", str(result_dir), "--size", "256",
157
  "--preprocess", "crop", "--batch_size", "4"]
158
  print("[talking] running inference…", flush=True)
159
- proc = _run(cmd, cwd=src, env=env, timeout=110)
160
  if proc.returncode != 0:
161
  tail = (proc.stderr or proc.stdout or "")[-1200:]
162
  raise RuntimeError(f"SadTalker inference failed: {tail}")
 
136
  return str(src_root)
137
 
138
 
139
+ @spaces.GPU(duration=100)
140
  def sadtalker_gpu(image_path, audio_path, out_path):
141
  """Run SadTalker inference in the vendored child process. The child must
142
  see the GPU ZeroGPU attached for this call — probed first so a subprocess
 
156
  "--result_dir", str(result_dir), "--size", "256",
157
  "--preprocess", "crop", "--batch_size", "4"]
158
  print("[talking] running inference…", flush=True)
159
+ proc = _run(cmd, cwd=src, env=env, timeout=88)
160
  if proc.returncode != 0:
161
  tail = (proc.stderr or proc.stdout or "")[-1200:]
162
  raise RuntimeError(f"SadTalker inference failed: {tail}")