MCPcopy
hub / github.com/wiltodelta/remove-ai-watermarks

github.com/wiltodelta/remove-ai-watermarks @v0.12.1 sqlite

repository ↗ · DeepWiki ↗ · release v0.12.1 ↗
1,311 symbols 4,349 edges 69 files 510 documented · 39%
README

Remove-AI-Watermarks

Remove visible and invisible AI watermarks from images generated by Google Gemini (Nano Banana), ChatGPT / DALL-E, Stable Diffusion, Adobe Firefly, Midjourney, and other AI models.

Strips SynthID, C2PA Content Credentials, EXIF/XMP "Made with AI" labels, and visible sparkle overlays — all in one command.

Try it online: raiw.cc

No Python, no GPU, no setup. Visible-watermark and metadata removal are free. Invisible-watermark removal (SynthID / SDXL regeneration) normally needs a local GPU and ~2 GB of models. On raiw.cc it runs on cloud GPUs in one click for a small per-image fee.

PyPI Python Downloads License Tests Sponsor

If this tool saves you time, consider sponsoring its development.

Intended for lawful use only. Publishing and running this software is lawful; responsibility for any downstream use, and for compliance with local law, rests entirely with the user. Some jurisdictions restrict removing an AI label as such (see Legal). The authors do not condone use for deception, fraud, or any unlawful activity.

Scope

This tool removes AI-provenance watermarks that a platform stamps onto content you generated yourself — SynthID, the Gemini / Nano Banana sparkle, the Doubao / Jimeng / Samsung visible AI labels, the Chinese TC260 "由…AI生成" label, and C2PA / IPTC / EXIF "Made with AI" metadata. The point is your autonomy over your own output.

It does not target watermarks that protect someone else's paid or copyrighted content — stock-agency overlays (Shutterstock, Getty, iStock, Adobe Stock), classifieds-site marks, or any tiled "preview" watermark whose job is to gate a purchase. Removing those is out of scope by design. erase is a generic, user-driven region tool for your own objects, not an automatic stock-watermark remover.

Features

  • Visible watermark removal — a registry of known marks in their usual places: the Gemini / Nano Banana sparkle, the Doubao "豆包AI生成" text strip, the Jimeng "★ 即梦AI" wordmark, and the Samsung Galaxy AI "✦ Contenuti generati dall'AI" strip (bottom-left, locale-specific). Each is removed by reverse-alpha blending against a captured alpha map (original = (wm − α·logo)/(1−α)), recovering the true pixels rather than inpainting a guess. The Gemini sparkle recovers cleanly on its own on bright backgrounds; it adapts the alpha to each image's sparkle opacity, so a more-opaque-than-captured sparkle is still fully removed (and on a dark background, where the fixed alpha would over-subtract and leave a dark spot, it automatically inpaints the small sparkle footprint instead); the Doubao, Jimeng, and Samsung text marks re-rasterize slightly per image, so a thin residual inpaint over the glyph footprint clears the leftover edges (the alpha maps are reproducibly rebuilt from controlled captures by scripts/visible_alpha_solve.py). Fast, offline, no GPU. visible --mark auto finds and removes the strongest detected mark. (For arbitrary logos/objects, see erase.)
  • Universal region eraser (erase) — remove any logo / watermark / object inside boxes you specify, regardless of position or colour. Default cv2 inpainting (CPU, instant); optional big-LaMa via onnxruntime (lama extra) for higher quality
  • Invisible watermark removal — SynthID, StableSignature, TreeRing via diffusion-based regeneration (needs a local GPU, or run it with no setup on raiw.cc)
  • AI metadata stripping — EXIF, PNG text chunks, C2PA provenance manifests (PNG / JPEG / AVIF / HEIF / JPEG-XL, MP4 / MOV / M4V / M4A at the container level, and WebM / MP3 / WAV / FLAC / OGG losslessly via ffmpeg), XMP DigitalSourceType
  • "Made with AI" label removal — removes the AI-disclosure metadata that platforms read to apply automatic labels (useful for clearing a false-positive label from a human-edited photograph)
  • Analog Humanizer — optional film grain and chromatic aberration post-processing
  • Text and face preservation (default) — the default pipeline is a canny ControlNet that keeps text and face structure sharp through the removal pass (without copying original pixels, so SynthID is still removed). Use --pipeline sdxl for plain SDXL img2img (lighter, no extra model download) on inputs without text or faces. An experimental --pipeline qwen runs Qwen-Image (20B, Apache-2.0) img2img, which preserves text (including CJK and small text) better than SDXL at equal strength; it is CUDA/cloud-class (does not fit MPS), and its strength floors are not yet certified (pass an explicit --strength, especially for Gemini content). Note: measured fidelity (scripts/fidelity_metrics.py) shows Qwen wins on text but controlnet preserves faces better (Qwen smooths skin more), so Qwen is not a universal upgrade. Canny preserves face structure, not identity (the regenerated face drifts in likeness). The library does not ship a face-restore extra: every approach evaluated (GFPGAN-on-cleaned, PhotoMaker-V2, InstantID txt2img, InstantID img2img-on-cleaned) regenerated the face via SDXL and made the output look more AI-generated than the cleaned image. The cleaned controlnet output is the least-AI face state achievable without re-introducing SynthID.
  • Batch processing — process entire directories
  • Detection — three-stage NCC watermark detection with confidence scoring
  • Provenance detection (identify) — aggregate C2PA issuer, the C2PA soft-binding forensic-watermark vendor (Adobe TrustMark, Digimarc, Imatag, ...), IPTC "Made with AI" plus the IPTC 2025.1 AISystemUsed field, embedded SD/ComfyUI params, EXIF/XMP generator tags, the xAI/Grok EXIF signature, the China TC260 AIGC label (XMP, PNG chunk, EXIF, or JPEG segment), the HuggingFace hf-job-id job marker, the SynthID metadata proxy, the C2PA cloud-manifest reference (Adobe Durable Content Credentials, when the embedded manifest is stripped), the visible marks (Gemini sparkle plus the Doubao "豆包AI生成" / Jimeng "即梦AI" / Samsung Galaxy AI "Contenuti generati dall'AI" text marks), the open SD/SDXL/FLUX invisible watermark, and (with the trustmark extra) the open Adobe TrustMark watermark into one origin-platform + watermark-inventory verdict (--json for machine output)

Examples

Before (Watermarked) After (Cleaned)
Before After

Supported models

AI model Visible watermark Invisible watermark Metadata Our approach
Google Gemini / Nano Banana / Gemini 3 Pro ✅ Sparkle logo ✅ SynthID v1 + v2 (default SDXL pipeline, native resolution) ✅ C2PA + EXIF Alpha reversal + diffusion + metadata strip
OpenAI DALL-E 3 / ChatGPT ✅ C2PA manifest Metadata strip
OpenAI ChatGPT Images 2.0 (gpt-image-2) ✅ SynthID + content-specific pixel watermark (since May 2026; no local decoder, openai.com/verify oracle) ✅ C2PA manifest (verified) Diffusion regeneration + metadata strip
Stable Diffusion / SDXL (AUTOMATIC1111, ComfyUI) ✅ DWT-DCT (imwatermark — locally detectable) ✅ PNG text chunks Diffusion regeneration + metadata strip
Black Forest Labs FLUX ✅ DWT-DCT (imwatermark — locally detectable) ✅ C2PA (FLUX.2 Pro) Diffusion regeneration + metadata strip
Adobe Firefly ✅ Content Credentials (C2PA) Metadata strip
Stability AI (DreamStudio / Stable Image) ✅ C2PA ("Stability AI Ltd") Metadata strip
Microsoft Designer / Bing Image Creator ✅ SynthID via DALL-E backend (Designer) ✅ C2PA (Bing runs MAI-Image, signed "Microsoft") Metadata strip
xAI Grok (Aurora) ✅ EXIF signature scheme (no C2PA): Signature: blob + UUID Artist Detected (identify); metadata strip
Midjourney ✅ EXIF + XMP (prompt, model, seed) Metadata strip
Meta AI ✅ IPTC "Made with AI" (digitalSourceType) Metadata strip (removes the label)
Doubao (ByteDance) / China AIGC generators ✅ "豆包AI生成" text strip (bottom-right) ✅ TC260 AIGC label (<TC260:AIGC> XMP, AIGC PNG chunk, or EXIF JSON) + C2PA signed by ByteDance Volcano Engine (volcengine) Reverse-alpha (captured α map) + thin residual inpaint, NCC-aligned across resolutions, + metadata strip
Jimeng / Dreamina (即梦AI, ByteDance) ✅ "★ 即梦AI" wordmark (bottom-right) ✅ TC260 AIGC label + C2PA (Volcano Engine) Reverse-alpha (captured α map) + residual inpaint over the glyph footprint, NCC-aligned across resolutions, + metadata strip
Samsung Galaxy AI (Generative Edit, Sketch to Image, ...) ✅ "✦ Contenuti generati dall'AI" strip (bottom-left, locale-specific) ✅ C2PA (signer "Samsung Galaxy") + trainedAlgorithmicMedia / proprietary genAIType marker Reverse-alpha (captured α map) + thin residual inpaint, NCC-aligned across resolutions, + metadata strip
Black Forest Labs (FLUX API) ✅ C2PA (Black Forest Labs API + c2pa.ai_generated_content + trainedAlgorithmicMedia) Metadata strip
StableSignature (Meta) ✅ In-model watermark Diffusion regeneration
TreeRing ✅ Latent space watermark Diffusion regeneration

Visible overlays are used by Google Gemini / Nano Banana (sparkle logo), by ByteDance's Doubao ("豆包AI生成" corner text) and Jimeng / Dreamina ("★ 即梦AI" wordmark), and by Samsung Galaxy AI ("✦ Contenuti generati dall'AI" strip, bottom-left, locale-specific). All are removed on CPU by reverse-alpha against a captured alpha map (Jimeng and Samsung add a thin residual inpaint over the glyph footprint, since their marks re-rasterize per image). Other services rely on invisible watermarks and/or metadata; our diffusion-based regeneration works against any invisible watermark in pixel or frequency domain. For a visible mark from any other source (any position, any colour), use the universal erase --region command.

Detection: remove-ai-watermarks identify <image> reports the origin platform and watermark inventory for all the signals above — C2PA issuer, the C2PA soft-binding forensic-watermark vendor (TrustMark / Digimarc / Imatag / ...), IPTC "Made with AI" plus the IPTC 2025.1 AISystemUsed field, the China TC260 AIGC label (XMP, PNG chunk, EXIF, or JPEG segment), the HuggingFace hf-job-id job marker, embedded generation params, EXIF/XMP generator tags, the xAI/Grok EXIF signature, the SynthID metadata proxy, the C2PA cloud-manifest reference (Adobe Durable Content Credentials, when the embedded manifest is stripped), the visible marks (Gemini sparkle plus the Doubao "豆包AI生成" / Jimeng "即梦AI" / Samsung Galaxy AI "Contenuti generati dall'AI" text marks), and (with the [detect] / [trustmark] extras) the open SD/SDXL/FLUX and Adobe TrustMark invisible watermarks. SynthID and the proprietary soft-binding watermarks (Digimarc etc.) have no local decoder, so they are reported by metadata proxy / vendor name only.

How it works

Removing the Gemini / Nano Banana sparkle watermark

Google Gemini (internally codenamed Nano Banana) adds a visible sparkle logo to generated images using alpha blending:

watermarked = α × logo + (1 − α) × original

We reverse this with a known alpha map (extracted from Gemini / Nano Banana output on a pure-black background):

original = (watermarked − α × logo) / (1 − α)

A three-stage NCC (Normalized Cross-Correlation) detector finds the watermark position and scale dynamically, so it works even if the image was resized or cropped. After removal, residual sparkle-edge artifacts are cleaned via gradient-masked inpainting.

Speed: ~0.05s per image. No GPU needed.

Removing the Doubao "豆包AI生成" text watermark

Doubao (ByteDance) stamps every output with a light, semi-transparent "豆包AI生成" text strip in the bottom-right corner — the visible AIGC label mandated by China's TC260 standard. It is a fixed semi-transparent white overlay, so it is removed by reverse-alpha blending: original = (watermarked - α·logo) / (1 - α), recovering the true pixels instead of hallucinating them. The α map is solved from controlled black/gray captures (rebuildable with scripts/visible_alpha_solve.py). Like the Jimeng mark, Doubao re-rasterizes its text slightly per image, so reverse-alpha is followed by a thin residual inpaint over the glyph footprint to clear the leftover edges, and the α template is NCC-aligned to the actual mark (handling per-image scale/position jitter). Detection matches the same glyph silhouette against the corner (normalized correlation), so it keys on the "豆包AI生成" shape, not on textured corners.

Speed: ~0.05s, no GPU needed.

Removing the Jimeng "★ 即梦AI" wordmark

Jimeng / Dreamina (即梦AI, also ByteDance, distinct from Doubao) stamps a "★ 即梦AI" wordmark — a four-point sparkle followed by the 即梦AI characters — in the bottom-right corner. It is a fixed semi-transparent pure-white overlay, solved from controlled black / gray / white captures the same way as Doubao. `visible --m

Core symbols most depended-on inside this repo

identify
called by 71
src/remove_ai_watermarks/identify.py
print
called by 63
src/remove_ai_watermarks/cli.py
print
called by 46
scripts/_plain_console.py
remove_ai_metadata
called by 31
src/remove_ai_watermarks/metadata.py
remove_watermark_reverse_alpha
called by 27
src/remove_ai_watermarks/_text_mark_engine.py
has_ai_metadata
called by 27
src/remove_ai_watermarks/metadata.py
detect
called by 22
src/remove_ai_watermarks/watermark_registry.py
_set_progress
called by 21
src/remove_ai_watermarks/noai/watermark_remover.py

Shape

Method 792
Function 329
Class 181
Route 9

Languages

Python100%

Modules by API surface

tests/test_metadata.py169 symbols
tests/test_identify.py143 symbols
tests/test_gemini_engine.py80 symbols
tests/test_cli.py78 symbols
tests/test_platform.py69 symbols
tests/test_noai.py69 symbols
src/remove_ai_watermarks/cli.py47 symbols
src/remove_ai_watermarks/noai/watermark_remover.py35 symbols
tests/test_tiling.py34 symbols
tests/test_invisible_engine.py30 symbols
src/remove_ai_watermarks/gemini_engine.py28 symbols
tests/test_region_eraser.py25 symbols

Dependencies from manifests, versioned

c2pa-python0.35.0 · 1×
click8.0.0 · 1×
numpy1.24.0 · 1×
opencv-python-headless4.8.0 · 1×
piexif1.1.3 · 1×
pillow10.0.0 · 1×
python-dotenv1.0.0 · 1×

For agents

$ claude mcp add remove-ai-watermarks \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact