From 00c559482ff734c8987b720fa68de5ad7b3916c3 Mon Sep 17 00:00:00 2001 From: Victor Kuznetsov Date: Mon, 8 Jun 2026 19:53:07 -0700 Subject: [PATCH] fix(invisible-engine): log exc_info + exception class on restore_faces failure The InstantID cert sweep emitted `restore_faces post-pass failed ()` -- the exception's str() was empty so the log line told us nothing about what actually failed. Adding `exc_info=True` plus `type(e).__name__` so the full traceback and exception class land in the log even when the message is empty. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/remove_ai_watermarks/invisible_engine.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/remove_ai_watermarks/invisible_engine.py b/src/remove_ai_watermarks/invisible_engine.py index 08c9302..59af72b 100644 --- a/src/remove_ai_watermarks/invisible_engine.py +++ b/src/remove_ai_watermarks/invisible_engine.py @@ -406,7 +406,12 @@ class InvisibleEngine: restored = instantid_restore.restore_faces_instantid(original_bgr, cleaned_bgr, seed=seed) image_io.imwrite(out_path, restored) except Exception as e: - logger.warning("restore_faces post-pass failed (%s); keeping un-restored output", e) + logger.warning( + "restore_faces post-pass failed (%s: %s); keeping un-restored output", + type(e).__name__, + e, + exc_info=True, + ) def _restore_faces_photomaker( self,