Jds20001 commited on
Commit
b72e013
·
verified ·
1 Parent(s): d57b63b

Bigger fast-swap time window (400/500s)

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -180,10 +180,11 @@ def _extract_video_path(v) -> str | None:
180
  def _generate_duration(guide_video_raw, face_image, prompt, duration, fps,
181
  lora_strength, seed, condition_mode, condition_strength,
182
  denoise_strength, enhance_faces, *args, **kwargs):
183
- # Fast swap (InsightFace) uses the GPU now; headroom covers the first-call model
184
- # downloads (~1GB) + GFPGAN per-frame enhancement.
 
185
  if str(condition_mode).startswith("Fast"):
186
- return 300 if enhance_faces else 200
187
  return 300
188
 
189
 
 
180
  def _generate_duration(guide_video_raw, face_image, prompt, duration, fps,
181
  lora_strength, seed, condition_mode, condition_strength,
182
  denoise_strength, enhance_faces, *args, **kwargs):
183
+ # Fast swap runs InsightFace on CPU (detection+recognition only, 320px see fastswap.py).
184
+ # Generous window covers the first-call ~1GB model downloads + GFPGAN (GFPGAN runs on the
185
+ # torch GPU, so it's fast). ZeroGPU allows this (DreamBoat uses 700).
186
  if str(condition_mode).startswith("Fast"):
187
+ return 500 if enhance_faces else 400
188
  return 300
189
 
190