Open-Source CLI Removes AI Watermarks from Images

New GitHub tool remove-ai-watermarks strips SynthID, C2PA and visible watermarks from AI images by Gemini, ChatGPT and others. Key for managing AI content.

Open-Source CLI Removes AI Watermarks from Images

A New CLI for Stripping AI Markers

A developer released

remove-ai-watermarkswiltodelta
View on GitHub →
on GitHub. The project supplies both a command-line tool and a Python library that targets visible and invisible markers left by models from Google, OpenAI, Stability AI, and others. It handles Gemini sparkle overlays through alpha reversal, SynthID and C2PA metadata through stripping routines, and several steganographic signals through diffusion-based regeneration. The announcement appeared on Hacker News with a working demo at raiw.cc.

Technical Approach and Commands

The tool runs as a single binary or importable module. For visible Gemini watermarks it reverses the alpha blend that places the sparkle logo, then reapplies local noise to hide the edit. Invisible marks require a short diffusion pass limited to the regions flagged by NCC detection. Metadata removal covers EXIF, PNG chunks, XMP, and C2PA manifests in one pass across PNG, JPEG, AVIF, HEIF, and JPEG-XL files.

Basic usage looks like this:

pip install remove-ai-watermarks
raiw clean input.png output.png
raiw batch ./folder --format png

The library exposes the same steps through functions that accept NumPy arrays, allowing integration into existing preprocessing pipelines. Face protection runs an optional MediaPipe pass that extracts and re-blends facial regions to reduce artifacts from the regeneration step. Film grain and chromatic aberration filters can be toggled to alter classifier scores without changing semantic content.

Trade-offs and Scope

The diffusion regeneration step adds noticeable latency on CPU and can introduce low-level texture changes that become visible at high zoom. Detection accuracy varies with image resolution and the exact SynthID version used during generation. For DALL-E 3 and ChatGPT images the tool currently removes only the C2PA manifest; no public detector exists yet for the newer pixel-level signal. Stable Diffusion outputs lose their DWT or TreeRing marks only when the regeneration flag is enabled, which increases processing time.

Batch mode processes directories but writes every output as a new file, so users must handle versioning themselves. The project ships with a small test set of before-and-after pairs that demonstrate removal on Gemini 3 Pro and SDXL samples. No training data or model weights are included; the diffusion component reuses an existing open checkpoint.

Integration Notes for Developers

The package depends on Pillow, OpenCV, and a minimal diffusers setup. Environment variables control the strength of grain addition and the device used for regeneration. Because the core removal routines stay deterministic for visible marks, the same input always produces the same cleaned output unless the diffusion flag is set. Developers embedding the library in web services can disable face protection and grain filters to keep latency under 200 ms per 1024-pixel image on a single GPU.

FAQ

Does the tool work on every AI model? It covers the listed visible and metadata markers for Gemini, DALL-E, Stable Diffusion, Midjourney, and Firefly. Newer unseen steganographic methods may require code updates.

Can I run it without installing Python? A hosted version at raiw.cc accepts uploads and returns cleaned files, though local use remains faster for batches.

Will removal affect image quality? Visible-mark removal stays lossless. Diffusion regeneration and grain filters introduce small texture shifts that remain acceptable for most downstream tasks.

---

📖 Related articles

Need a consultation?

I help companies and startups build software, automate workflows, and integrate AI. Let's talk.

Get in touch
← Back to blog