-
Notifications
You must be signed in to change notification settings - Fork 474
Releases: aloshdenny/reverse-SynthID
v4
302f7c7 What's New in V4
V4 is a complete rebuild of the watermark-dissolving pipeline, adding multi-model support, a richer codebook, and a new all-in-one attack that defeats the SynthID detector on both gemini-3.1-flash-image-preview and nano-banana-pro-preview after six rounds of iterative adversarial refinement.
The Breakthrough: Round-06 All-in-One Attack ✓
Previous rounds (spectral subtraction, blog-guided bin targeting, denoise-residual phase, VAE re-generation) all failed. Round 06 works by stacking every SynthID failure mode the Gemini app itself documents into a single 7-stage pipeline:
- VAE round-trip (Stable Diffusion
sd-vae-ft-mse) — projects the image off the natural-image manifold the SynthID decoder was never trained against (Gowal et al. 2026 §6.1) - Elastic deformation — smooth low-frequency random warp field that fragments the watermark's spatial phase consensus, simulating the "collage effect" Gemini's own help text identifies as a detection failure
- Global geometric combo — rotation + zoom + shift in one affine warp
- Resize-squeeze — AREA downsample → LANCZOS upsample, erases sub-pixel watermark info
- Color-contrast nudge — brightness / saturation / hue micro-shift
- Residual-phase FFT subtraction — blog-universal + codebook-harvested carrier bins
- JPEG chain + luma noise + bilateral filter
Two presets: final (balanced) and nuke (maximum strength). Output is visually indistinguishable from the original.
New: SpectralCodebookV4
- Multi-model: separate profiles for
gemini-3.1-flash-image-previewandnano-banana-pro-preview - Multi-color consensus: 6 solid-color backgrounds (black, white, blue, green, red, gray) per model per resolution — only bins with phase-locked across all colors are treated as carriers
- 7 resolutions ×ばつ 2 models = 14 profiles, covering all common Gemini output sizes
- Format v5: LZMA-compressed, int8 phase, uint8 mag/cw, sparse-zeroed below the 0.55 coherence threshold — 221 MB → 24 MB (89% reduction, lossless for the bypass)
⬇️ Download
spectral_codebook_v4.npzfrom the release assets and place it inartifacts/.
New Files
| File | Purpose |
|---|---|
src/extraction/synthid_bypass_v4.py |
Core codebook + all bypass methods |
src/extraction/vae_regen.py |
SD-VAE re-generation stage (MPS / CUDA / CPU) |
scripts/build_codebook_v4.py |
Build a codebook from the hierarchical dataset |
scripts/dissolve_batch.py |
Run final / nuke presets over a folder |
scripts/calibrate_from_feedback.py |
Update carrier weights from detection feedback |
Quickstart
pip install torch diffusers safetensors accelerate opencv-python numpy scipy python scripts/dissolve_batch.py \ --input ./watermarked/ \ --output ./cleaned/ \ --codebook artifacts/spectral_codebook_v4.npz \ --model gemini-3.1-flash-image-preview \ --strengths final nuke
Assets 2
v3.1
93cf20d What's Changed
- Fix multiple bugs in extraction pipeline by @hobostay in #13
- Add 1062 reference images at 2 new resolutions + expanded codebook by @BensonRen in #14
- Add 93 black reference images (gemini_black_nb_pro) by @mrbeandev in #17
- Fix codebook loading error when .npz path is passed to extractor by @mrbeandev in #18
- Migrate reference images to Hugging Face, remove from git by @mrbeandev in #22
- Fix detection: empirically verified carrier frequencies by @mrbeandev in #23
New Contributors
- @hobostay made their first contribution in #13
- @BensonRen made their first contribution in #14
- @mrbeandev made their first contribution in #17
Full Changelog: https://github.com/aloshdenny/reverse-SynthID/commits/v3