From efc5b4a9af12f217c410e2de62756aea631eac1f Mon Sep 17 00:00:00 2001 From: Victor Kuznetsov Date: Tue, 9 Jun 2026 11:12:53 -0700 Subject: [PATCH] docs(auto): drop stale face-restore mentions from --auto The face-restore family was removed in 20d7eda, but the auto_config module docstring still claimed "PhotoMaker face restoration is enabled when a face is present" and the --auto help text (CLI + README example) listed "face restore" as something --auto picks. A detected face now only routes to the controlnet pipeline (canny preserves face STRUCTURE, not identity); there is no identity restoration. Comments/docstrings/help only, no code behavior change. Co-Authored-By: Claude Opus 4.8 --- README.md | 2 +- src/remove_ai_watermarks/auto_config.py | 15 +++++++++------ src/remove_ai_watermarks/cli.py | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e9ec906..9bddf9c 100644 --- a/README.md +++ b/README.md @@ -294,7 +294,7 @@ remove-ai-watermarks invisible image.png -o clean.png --humanize 4.0 --unsharp 0 # GPU/MPS, cap the long side: --max-resolution 2048 # Strength is vendor-adaptive by default (OpenAI 0.10 / Google 0.15); override # with --strength. To preserve text/face structure, use --pipeline controlnet -# Or let it choose: --auto picks the pipeline, face restore, and an adaptive polish +# Or let it choose: --auto picks the pipeline and an adaptive polish # from the image content (controlnet when there is text/structure, polish that # restores the input's detail level while sparing text). Every choice is # overridable: --pipeline and --no-adaptive-polish win over the auto pick. diff --git a/src/remove_ai_watermarks/auto_config.py b/src/remove_ai_watermarks/auto_config.py index 641552d..06ca06b 100644 --- a/src/remove_ai_watermarks/auto_config.py +++ b/src/remove_ai_watermarks/auto_config.py @@ -8,11 +8,14 @@ host (image work there OOM-crashes the container). Routing is **quality-priority**: ControlNet (text/face-structure preservation) is the default; it is only skipped for a clearly structure-less image (no face, no text, -near-zero edges), where plain SDXL is cheaper and just as good. PhotoMaker face -restoration is enabled when a face is present. When a smoothing pass (controlnet or -face restore) ran, the **adaptive polish** (``humanizer.adaptive_polish``) restores -the input's detail level -- a capped unsharp + edge-masked grain targeting the input's -Laplacian variance -- to counter the over-smoothed "AI look". It is self-limiting on +near-zero edges), where plain SDXL is cheaper and just as good. A detected face only +routes to controlnet (canny preserves face STRUCTURE, not identity); there is no +identity restoration -- the whole face-restore family was removed (it regenerated the +face via SDXL and looked MORE AI-generated, see +docs/synthid-robust-identity-research-2026-06-08.md). When the controlnet smoothing +pass ran, the **adaptive polish** (``humanizer.adaptive_polish``) restores the input's +detail level -- a capped unsharp + edge-masked grain targeting the input's Laplacian +variance -- to counter the over-smoothed "AI look". It is self-limiting on text/graphics (already high-frequency, so almost no polish) and spares text/edges by masking the grain. @@ -71,7 +74,7 @@ _DBNET_INPUT_SIDE = 736 # square input, multiple of 32 (PP-OCRv3 default) _DBNET_MEAN = (122.67891434, 116.66876762, 104.00698793) # ImageNet mean * 255 _dbnet: Any = None # lazy singleton; set to False after a load failure (-> MSER fallback) -# When a smoothing pass ran (controlnet or face restore), the adaptive polish +# When the controlnet smoothing pass ran, the adaptive polish # (humanizer.adaptive_polish) restores the input's detail level, sparing text -- # replacing the old fixed unsharp/grain which over-/under-corrected and speckled text. _UPSCALE_FLOOR = 1024 diff --git a/src/remove_ai_watermarks/cli.py b/src/remove_ai_watermarks/cli.py index 72a9533..9e7b3fa 100644 --- a/src/remove_ai_watermarks/cli.py +++ b/src/remove_ai_watermarks/cli.py @@ -173,7 +173,7 @@ _auto_option = click.option( "--auto", is_flag=True, default=False, - help="Auto-pick the pipeline, face restore, and adaptive polish from image content. " + help="Auto-pick the pipeline and adaptive polish from image content. " "Every choice is overridable -- an explicit --pipeline / --adaptive-polish " "always wins. EXPERIMENTAL.", )