mirror of
https://github.com/wiltodelta/remove-ai-watermarks.git
synced 2026-10-14 21:40:47 +02:00
Ship generator taxonomy: bytedance class, model-side receipt gate
Provider classes now name the GENERATOR that rendered the pixels, never the brand. bytedance joins openai/google/muse-image as the shared ByteDance lineage (Doubao and Jimeng render with one model family; measured: separate heads cross-fire 32/22 at 3.5x mass, the surgical union holds 83.9% on the frozen test cell while openai/google/meta/no_ai stay byte-identical to run1). tc260 stops being a public value: its head remains as the group veto for the rest of China's generators (without it, 207/379 China test rows would be falsely named openai or muse-image), and the loader tolerates provider snapshots that predate bytedance. The receipt gate moves model-side: stable-name artifact receipt-gate.npz carries its threshold, head and threshold always load from one file, and the publish script stages the stable gate from the weights source. Microsoft stays metadata-only: 144 of its 253 bank rows name an OpenAI model as their C2PA softwareAgent and none names a Microsoft renderer. pre-commit: 1) maintain.sh - exit 1 (uv-secure: lightning 2.6.5 via trustmark, PYSEC-2026-3624 no fix released; per docs/development.md the core checks ran separately: ruff clean, pyright 0 errors, 2059 passed 3 skipped); 2) /simplify - single-pass four angles, clean, one noted skip (gate-test npz staging duplication); 3) docs sync - grepped bytedance/receipt-gate.npz/provider values over README, docs, skill, rules: no stale references; 4) CLAUDE.md - improver: no changes, revise: no additions (learnings live in canonical docs)
This commit is contained in:
11 files changed
+412
-74
No files matched your search
@@ -33,6 +33,7 @@ DETECTOR_FILE = "detector.pt"
|
||||
PROVIDER_FILE = "provider.pt"
|
||||
WEIGHT_FILES = (CLIP_FILE, PROBE_FILE, DETECTOR_FILE, PROVIDER_FILE)
|
||||
GATE_FILE = "receipt-gate-2026-09-02.npz"
|
||||
GATE_STABLE_FILE = "receipt-gate.npz"
|
||||
REPO_ROOT = Path(__file__).resolve().parents[1]
|
||||
GATE_SOURCE = REPO_ROOT / "src" / "remove_ai_watermarks" / "assets" / GATE_FILE
|
||||
CARD_DIR = REPO_ROOT / "docs" / "photo-classify-hf"
|
||||
@@ -83,6 +84,10 @@ def stage_weights(dest: Path, src: Path) -> None:
|
||||
for name, path in weight_paths(src).items():
|
||||
_place(path, dest / name)
|
||||
log.info("stage %s (%s bytes)", name, path.stat().st_size)
|
||||
stable_gate = src / GATE_STABLE_FILE
|
||||
if stable_gate.is_file():
|
||||
_place(stable_gate, dest / GATE_STABLE_FILE)
|
||||
log.info("stage %s (%s bytes)", GATE_STABLE_FILE, stable_gate.stat().st_size)
|
||||
|
||||
|
||||
def publish(stage: Path, *, token: str, message: str) -> str:
|
||||
@@ -95,7 +100,7 @@ def publish(stage: Path, *, token: str, message: str) -> str:
|
||||
repo_id=HUB_REPO,
|
||||
repo_type="model",
|
||||
commit_message=message,
|
||||
allow_patterns=["README.md", "operating-point.json", *WEIGHT_FILES, GATE_FILE],
|
||||
allow_patterns=["README.md", "operating-point.json", *WEIGHT_FILES, GATE_FILE, GATE_STABLE_FILE],
|
||||
)
|
||||
return getattr(commit, "oid", "") or ""
|
||||
|
||||
|
||||
Reference in new issue
Block a user