fix: extract frames for map faces fallback (#1824)

Verified this fix. Confirmed the bug by reverting just the `modules/core.py` hunk and
re-running the new regression test — with the old code, `process_video`/`create_video`
run against a temp directory that was never populated when `map_faces=True`, since
`create_temp`/`extract_frames` were skipped for that case. That means map-faces video
runs were silently broken (empty or failed output).

The fix removes the `map_faces` guard so extraction always runs before the disk-based
fallback, which is correct for both cases that reach this branch (map_faces=True, and
non-map-faces pipe failures). `create_temp` is idempotent (mkdir exist_ok=True), so the
double-call for the non-map-faces path is harmless.
This commit is contained in:
cuyua9
2026-08-14 06:44:22 +08:00
committed by GitHub
parent 97a44800a2
commit 987f6b392b
2 changed files with 140 additions and 4 deletions
+3 -4
View File
@@ -276,10 +276,9 @@ def start() -> None:
update_status('Falling back to disk-based processing...')
extraction_start = time.time()
if not modules.globals.map_faces:
create_temp(modules.globals.target_path)
update_status('Extracting frames...')
extract_frames(modules.globals.target_path)
create_temp(modules.globals.target_path)
update_status('Extracting frames...')
extract_frames(modules.globals.target_path)
extraction_time = time.time() - extraction_start
temp_frame_paths = get_temp_frame_paths(modules.globals.target_path)