From 834342db070843c62437e6cec7ee3ce4dd31b61b Mon Sep 17 00:00:00 2001 From: Victor Kuznetsov Date: Thu, 27 Aug 2026 16:41:28 -0700 Subject: [PATCH] Follow the seal bet in the Likely-source line A standalone-tag file showed 'platform not specified' while the panel below priced the Muse Content Seal removal - the platform line lagged the attribution the seal signal and the strength router already make. The fallback now attributes 'Meta Muse Image (attributed by the standalone AI digital-source tag)' when no more specific attribution applies, so the source line and the priced target agree. Apple Photos Clean Up keeps its own attribution; the hedge names the attribution basis, not a detection. --- pyproject.toml | 2 +- src/remove_ai_watermarks/__init__.py | 2 +- src/remove_ai_watermarks/identify.py | 15 ++++++++++----- tests/test_identify.py | 21 +++++++++++++++++++++ uv.lock | 2 +- 5 files changed, 34 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 63b6b18..b6f074d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ # on it, including the ComfyUI node package. The console script below carries # the same weight, since users have it on PATH. name = "remove-ai-watermarks" -version = "0.33.0" +version = "0.33.1" description = "AI watermark remover for visible, invisible, and provenance marks in images and video" readme = "README.md" requires-python = ">=3.11,<3.15" diff --git a/src/remove_ai_watermarks/__init__.py b/src/remove_ai_watermarks/__init__.py index b0a2d71..9989128 100644 --- a/src/remove_ai_watermarks/__init__.py +++ b/src/remove_ai_watermarks/__init__.py @@ -32,7 +32,7 @@ _os.environ.setdefault("TRANSFORMERS_VERBOSITY", "error") _warnings.filterwarnings("ignore", message=r".*ImageProcessorFast.*") -__version__ = "0.33.0" +__version__ = "0.33.1" __all__ = [ "BatchSummary", diff --git a/src/remove_ai_watermarks/identify.py b/src/remove_ai_watermarks/identify.py index 3f2b164..ea3fea2 100644 --- a/src/remove_ai_watermarks/identify.py +++ b/src/remove_ai_watermarks/identify.py @@ -1356,11 +1356,16 @@ def _identify_from_evidence( # the edit with photoshop:Credit / IPTC "Apple Photos Clean Up" # next to compositeWithTrainedAlgorithmicMedia. It was detected but # previously never attributed. - platform = ( - "Apple Photos (Clean Up AI edit)" - if b"Apple Photos Clean Up" in head - else "Made-with-AI tag (e.g. Meta AI); platform not specified" - ) + if b"Apple Photos Clean Up" in head: + platform = "Apple Photos (Clean Up AI edit)" + else: + # The platform line follows the same measured bet the seal signal + # and the strength router make: Muse Image is the tag writer whose + # outputs this profile targets, so a hedged Muse attribution is + # more useful than "platform not specified" while the panel below + # already prices the Content Seal removal. The hedge stays in the + # wording - it names the attribution basis, not a detection. + platform = "Meta Muse Image (attributed by the standalone AI digital-source tag)" # ── IPTC 2025.1 AI-disclosure fields (Iptc4xmpExt:AISystemUsed etc.) ─ iptc_ai = any(m in head for m in IPTC_AI_FIELD_MARKERS) diff --git a/tests/test_identify.py b/tests/test_identify.py index 80fb73d..79575c2 100644 --- a/tests/test_identify.py +++ b/tests/test_identify.py @@ -690,6 +690,27 @@ class TestIdentifyRealSamples: assert "Invisible Content Seal watermark (Meta Muse attribution)" in r.watermarks assert any("meta.ai/identification" in c for c in r.caveats) + def test_seal_platform_attribution_follows_the_signal(self, tmp_path: Path): + """The Likely-source line follows the same bet the seal signal makes. + + Apple keeps its own attribution; every other standalone-tag file gets the + hedged Muse attribution instead of "platform not specified", so the panel + that prices the Content Seal and the source line agree. + """ + muse = tmp_path / "muse.jpg" + muse.write_bytes( + b'\xff\xd8\xff\xe1\xff\xd9' + ) + apple = tmp_path / "apple.jpg" + apple.write_bytes( + b'\xff\xd8\xff\xe1\xff\xd9' + ) + + assert identify(muse, check_visible=False, check_invisible=False).platform == ( + "Meta Muse Image (attributed by the standalone AI digital-source tag)" + ) + assert identify(apple, check_visible=False, check_invisible=False).platform == "Apple Photos (Clean Up AI edit)" + def test_c2pa_backed_file_gets_no_content_seal_attribution(self): """C2PA issuers win first: a manifest-backed file is not Meta-routed.""" r = identify(SAMPLES_DIR / "flux-1.png", check_visible=False, check_invisible=False) diff --git a/uv.lock b/uv.lock index 604b397..607ad09 100644 --- a/uv.lock +++ b/uv.lock @@ -3169,7 +3169,7 @@ wheels = [ [[package]] name = "remove-ai-watermarks" -version = "0.33.0" +version = "0.33.1" source = { editable = "." } dependencies = [ { name = "c2pa-python" },