Spaces:
Running on Zero
Running on Zero
Bigger fast-swap time window (400/500s)
Browse files
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
|
| 184 |
-
#
|
|
|
|
| 185 |
if str(condition_mode).startswith("Fast"):
|
| 186 |
-
return
|
| 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 |
|