mirror of
https://github.com/wiltodelta/remove-ai-watermarks.git
synced 2026-10-22 16:48:24 +02:00
Pin published ONNX classifier snapshot
This commit is contained in:
5 files changed
+8
-8
No files matched your search
@@ -1105,8 +1105,8 @@ buffers are fully materialized.
|
||||
|
||||
The optional CPU-only `backend="onnx"` path reads a static batch-one,
|
||||
vision-only FP32 graph produced by `scripts/export_photo_classify_onnx.py`.
|
||||
PyTorch remains the default until that artifact is published in the pinned Hub
|
||||
snapshot. The graph is 1,216,102,506 bytes versus the 1,710,697,163-byte full
|
||||
The graph is published in the pinned Hub snapshot; PyTorch remains the default.
|
||||
It is 1,216,102,506 bytes versus the 1,710,697,163-byte full
|
||||
PyTorch checkpoint; the removed text tower alone is 494,601,216 bytes. A
|
||||
2026-09-10 stress comparison covered 500 locally available catalog photographs
|
||||
closest to either Model 1 threshold plus 500 deterministic family-stratified
|
||||
|
||||
@@ -40,9 +40,9 @@ Missing extra raises `RuntimeError` with
|
||||
`pip install 'remove-ai-watermarks[classify]'`. `device` is a library
|
||||
parameter (`None` / `"auto"` / `"cpu"` / `"cuda"`), not a CLI option. The
|
||||
explicit `backend="onnx"` path is CPU-only and requires
|
||||
`clip-l-ft-vision-fp32.onnx` in `RAIW_CLASSIFY_WEIGHTS`; PyTorch remains the
|
||||
default until that artifact is published in the pinned Hub snapshot. Install
|
||||
the experimental runtime with `pip install 'remove-ai-watermarks[classify-onnx]'`.
|
||||
`clip-l-ft-vision-fp32.onnx` in `RAIW_CLASSIFY_WEIGHTS` or the pinned Hub
|
||||
snapshot. PyTorch remains the default. Install the optional runtime with
|
||||
`pip install 'remove-ai-watermarks[classify-onnx]'`.
|
||||
|
||||
Weights are not in git. First call downloads
|
||||
[`wiltodelta/raiw-photo-classify`](https://huggingface.co/wiltodelta/raiw-photo-classify)
|
||||
|
||||
+1
-1
@@ -155,7 +155,7 @@ classify = [
|
||||
"huggingface-hub>=0.20.0",
|
||||
]
|
||||
# Optional vision-only CPU runtime for the photo classifier. Keep it separate
|
||||
# until the ONNX artifact is published and the backend becomes the default.
|
||||
# because PyTorch remains the default and ONNX Runtime is needed only on opt-in.
|
||||
classify-onnx = [
|
||||
"remove-ai-watermarks[classify]",
|
||||
"onnxruntime>=1.24.0",
|
||||
|
||||
@@ -22,7 +22,7 @@ CLASSIFY_EXTRA = "'remove-ai-watermarks[classify]'"
|
||||
CLASSIFY_ONNX_EXTRA = "'remove-ai-watermarks[classify-onnx]'"
|
||||
WEIGHTS_ENV = "RAIW_CLASSIFY_WEIGHTS"
|
||||
WEIGHTS_REPO = "wiltodelta/raiw-photo-classify"
|
||||
WEIGHTS_REVISION = "4c2763766dd1c8c212d64e01e1cc3f166243c47d"
|
||||
WEIGHTS_REVISION = "de668f0d8a53412923478cc21382a56890748310"
|
||||
CLIP_FILE = "clip-l-ft.pt"
|
||||
CLIP_ONNX_FILE = "clip-l-ft-vision-fp32.onnx"
|
||||
PROBE_FILE = "probe-weights-clip-l-ft.npz"
|
||||
|
||||
@@ -55,7 +55,7 @@ def _scores(
|
||||
|
||||
def test_hub_snapshot_is_the_freeze_revision() -> None:
|
||||
assert WEIGHTS_REPO == "wiltodelta/raiw-photo-classify"
|
||||
assert WEIGHTS_REVISION == "4c2763766dd1c8c212d64e01e1cc3f166243c47d"
|
||||
assert WEIGHTS_REVISION == "de668f0d8a53412923478cc21382a56890748310"
|
||||
|
||||
|
||||
def test_runtime_requests_only_the_selected_backend_model(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
|
||||
Reference in new issue
Block a user