diff --git a/app/processors/video_processor.py b/app/processors/video_processor.py index e0f367fa..61a5f226 100644 --- a/app/processors/video_processor.py +++ b/app/processors/video_processor.py @@ -1969,6 +1969,9 @@ def stop_processing(self) -> bool: self.recording = False self.triggered_by_job_manager = False self.active_output_folder = "" + # Disarm the batch recognition flag to prevent UI side-effects after an abort + if hasattr(self.main_window, "force_recognition_in_batch"): + self.main_window.force_recognition_in_batch = False self._cancel_single_frame_preview_state() # 2. Stop utility timers and audio diff --git a/app/ui/widgets/actions/job_manager_actions.py b/app/ui/widgets/actions/job_manager_actions.py index fe56a936..c96767bb 100644 --- a/app/ui/widgets/actions/job_manager_actions.py +++ b/app/ui/widgets/actions/job_manager_actions.py @@ -1603,6 +1603,12 @@ def load_job_settings(main_window: "MainWindow", job_data: dict): # 4. Load markers. _load_job_markers(main_window, job_data) + # --- Arm the recognition flag for the new job --- + # We MUST set this to True here in the Main Thread before processing starts. + # This forces the sequential_detector's feeder_thread to run ArcFace on the + # first frame, preventing identity bleed (Fast-Path bypass) from the previous job. + main_window.force_recognition_in_batch = True + # Calculate assigned_input_embedding here for KV injection for face_id, target_face_button in main_window.target_faces.items(): print(