mirror of
https://github.com/wiltodelta/remove-ai-watermarks.git
synced 2026-08-07 14:38:35 +02:00
chore: mark controlnet pipeline + GFPGAN restore-faces as experimental
Both content-preservation features are now flagged EXPERIMENTAL and opt-in. --pipeline controlnet was already opt-in (default=default); --restore-faces flips from on-by-default to OFF by default, matching the repo's prior pattern for experimental preservation passes (the removed protect_text/protect_faces). - cli.py: --restore-faces/--no-restore-faces default False; EXPERIMENTAL in the --restore-faces / --controlnet-scale / --pipeline help; batch default False. - invisible_engine.py: remove_watermark restore_faces default False + docstring. - CLAUDE.md / README.md / docs/synthid.md: label both experimental/opt-in. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
411ef16ec3
commit
5ec8269949
@@ -143,7 +143,8 @@ _controlnet_scale_option = click.option(
|
||||
"--controlnet-scale",
|
||||
type=float,
|
||||
default=1.0,
|
||||
help="ControlNet conditioning scale (structure/text preservation strength), controlnet pipeline only.",
|
||||
help="ControlNet conditioning scale (structure/text preservation strength), controlnet pipeline "
|
||||
"only (EXPERIMENTAL).",
|
||||
)
|
||||
|
||||
|
||||
@@ -151,10 +152,10 @@ def _restore_faces_options(f: Any) -> Any:
|
||||
"""Attach the shared GFPGAN face-restoration flags to an invisible-pipeline command."""
|
||||
restore_flag = click.option(
|
||||
"--restore-faces/--no-restore-faces",
|
||||
default=True,
|
||||
help="Restore face identity with a GFPGAN post-pass when faces are present "
|
||||
"(needs the 'restore' extra); on by default, auto-skips when no face is detected "
|
||||
"or the extra is absent.",
|
||||
default=False,
|
||||
help="EXPERIMENTAL, opt-in. Restore face identity with a GFPGAN post-pass when "
|
||||
"faces are present (needs the 'restore' extra); off by default, auto-skips when no "
|
||||
"face is detected or the extra is absent.",
|
||||
)
|
||||
weight_flag = click.option(
|
||||
"--restore-faces-weight",
|
||||
@@ -471,7 +472,7 @@ def cmd_erase(
|
||||
type=click.Choice(["default", "controlnet"]),
|
||||
default="default",
|
||||
help="Pipeline profile (default=SDXL img2img; controlnet=SDXL + canny ControlNet that preserves "
|
||||
"text/faces via edge conditioning while removing SynthID).",
|
||||
"text/faces via edge conditioning while removing SynthID, EXPERIMENTAL).",
|
||||
)
|
||||
@click.option(
|
||||
"--device",
|
||||
@@ -715,7 +716,7 @@ def cmd_identify(ctx: click.Context, source: Path, no_visible: bool, as_json: bo
|
||||
type=click.Choice(["default", "controlnet"]),
|
||||
default="default",
|
||||
help="Pipeline profile (default=SDXL img2img; controlnet=SDXL + canny ControlNet that preserves "
|
||||
"text/faces via edge conditioning while removing SynthID).",
|
||||
"text/faces via edge conditioning while removing SynthID, EXPERIMENTAL).",
|
||||
)
|
||||
@click.option("--model", type=str, default=None, help="HuggingFace model ID for invisible removal.")
|
||||
@click.option(
|
||||
@@ -907,7 +908,7 @@ def _process_batch_image(
|
||||
hf_token: str | None,
|
||||
humanize: float,
|
||||
max_resolution: int = 0,
|
||||
restore_faces: bool = True,
|
||||
restore_faces: bool = False,
|
||||
restore_faces_weight: float = 0.5,
|
||||
) -> None:
|
||||
"""Process a single image for batch mode.
|
||||
@@ -1012,7 +1013,7 @@ def _process_batch_image(
|
||||
type=click.Choice(["default", "controlnet"]),
|
||||
default="default",
|
||||
help="Pipeline profile (default=SDXL img2img; controlnet=SDXL + canny ControlNet that preserves "
|
||||
"text/faces via edge conditioning while removing SynthID).",
|
||||
"text/faces via edge conditioning while removing SynthID, EXPERIMENTAL).",
|
||||
)
|
||||
@click.option(
|
||||
"--device",
|
||||
|
||||
@@ -126,7 +126,7 @@ class InvisibleEngine:
|
||||
humanize: float = 0.0,
|
||||
max_resolution: int = 0,
|
||||
vendor: str | None = None,
|
||||
restore_faces: bool = True,
|
||||
restore_faces: bool = False,
|
||||
restore_faces_weight: float = 0.5,
|
||||
) -> Path:
|
||||
"""Remove invisible watermark from an image.
|
||||
@@ -140,9 +140,10 @@ class InvisibleEngine:
|
||||
guidance_scale: Classifier-free guidance scale.
|
||||
seed: Random seed for reproducibility.
|
||||
humanize: Intensity of Analog Humanizer film grain (0 = off).
|
||||
restore_faces: Run the optional GFPGAN face-restoration post-pass when
|
||||
faces are present (needs the ``restore`` extra). Auto-skips with a
|
||||
debug log when the extra is absent or no face is detected.
|
||||
restore_faces: EXPERIMENTAL, opt-in (default False). Run the GFPGAN
|
||||
face-restoration post-pass when faces are present (needs the
|
||||
``restore`` extra). Auto-skips with a debug log when the extra is
|
||||
absent or no face is detected.
|
||||
restore_faces_weight: GFPGAN fidelity weight (0-1); lower = more GAN
|
||||
regeneration (cleaner watermark scrub), higher = closer to input.
|
||||
max_resolution: Cap the long side (px) before diffusion. 0 (default)
|
||||
|
||||
Reference in New Issue
Block a user