From 9525d4529195a96b3ff753c4601d7af617ddbe0f Mon Sep 17 00:00:00 2001 From: Matt Van Horn Date: Mon, 30 Mar 2026 23:49:12 -0700 Subject: [PATCH] fix(face-enhancer): add missing process_frame_v2 method The live webcam preview in ui.py calls process_frame_v2() on all frame processors, but face_enhancer.py was missing this method. This caused an AttributeError crash when the GFPGAN face enhancer was enabled during live mode. Fixes https://github.com/hacksider/Deep-Live-Cam/issues/1654 Co-Authored-By: Claude Opus 4.6 (1M context) --- modules/processors/frame/face_enhancer.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/processors/frame/face_enhancer.py b/modules/processors/frame/face_enhancer.py index bbc8276..8f0c235 100644 --- a/modules/processors/frame/face_enhancer.py +++ b/modules/processors/frame/face_enhancer.py @@ -319,6 +319,11 @@ def process_frame(source_face: Face | None, temp_frame: Frame) -> Frame: return temp_frame +def process_frame_v2(temp_frame: Frame) -> Frame: + """Processes a frame without source face (used by live webcam preview).""" + return enhance_face(temp_frame) + + def process_frames( source_path: str | None, temp_frame_paths: List[str], progress: Any = None ) -> None: