gemini-watermark-remover README

The project's README from github.com/GargantuaX/gemini-watermark-remover. As one markdown file: README.md.

中文文档

🔥 Tired of Gemini watermarks? Try the more powerful GPT Image 2 at pilio.ai — free for a limited time.

Gemini Watermark Remover — Lossless Watermark Removal Tool

An open-source tool to remove Gemini watermarks from AI-generated images with high-fidelity, reproducible results on supported outputs. Built with pure JavaScript, the engine uses a mathematically exact Reverse Alpha Blending algorithm instead of unpredictable AI inpainting.

🚀 Looking for the Online Gemini Watermark Remover (Recommended)? Try geminiwatermarkremover.io — free, no install, works directly in your browser.

💡 Got watermarks that Gemini Watermark Remover can't handle? Try the general-purpose AI watermark remover: pilio.ai/image-watermark-remover

Online Tool  Video Watermark Remover  Chrome Extension  Userscript  General Watermark Remover

Features

Gemini Watermark Removal Examples

Click to Expand/Collapse Examples
Original Image Watermark Removed

⚠️ Disclaimer

[!WARNING] USE AT YOUR OWN RISK

This tool modifies image files. While it is designed to work reliably, unexpected results may occur due to:

  • Variations in Gemini's watermark implementation
  • Corrupted or unusual image formats
  • Edge cases not covered by testing

The author assumes no responsibility for any data loss, image corruption, or unintended modifications. By using this tool, you acknowledge that you understand these risks.

[!NOTE] Note: Disable any fingerprint defender extensions (e.g., Canvas Fingerprint Defender) to avoid processing errors. https://github.com/GargantuaX/gemini-watermark-remover/issues/3

How to Remove Gemini Watermarks

For all users — the fastest and easiest way to remove Gemini watermarks from images:

  1. Open geminiwatermarkremover.io.
  2. Drag and drop or click to select your Gemini-generated image.
  3. The engine will automatically process and remove the watermark.
  4. Download the cleaned image.

Online Video Watermark Remover (New!)

For Gemini-generated videos with visible watermarks:

  1. Open geminiwatermarkremover.io/video.
  2. Upload or drag-and-drop your Gemini-generated video.
  3. The tool will automatically detect and remove the watermark from the video.
  4. Download the cleaned video.

Note: Video watermark removal runs entirely in your browser — no files are uploaded to any server.

Chrome Extension

Use this if you do not want a userscript manager but still want automatic Gemini page integration for previews, copy, and download actions.

  1. Open Gemini Watermark Remover on the Chrome Web Store.
  2. Click Add to Chrome and confirm the install.
  3. Open Gemini. The extension will automatically process supported Gemini images.

The popup includes an "Enable on Gemini" toggle. If Gemini becomes slow, behaves unexpectedly, or you need to troubleshoot the page, turn the toggle off and refresh Gemini.

Chrome Web Store installs update automatically. If the Web Store is not reachable in your network, the matching verified zip (gemini-watermark-remover-extension-v*.zip) remains available from GitHub Releases and the official website download entry for manual unpacked installation.

Userscript

  1. Install a userscript manager (e.g., Tampermonkey or Greasemonkey).
  2. Open gemini-watermark-remover.user.js.
  3. The script will install automatically.
  4. Navigate to Gemini conversation pages.
  5. Eligible Gemini preview images on the page are replaced in place after processing.
  6. Gemini's native "Copy Image" and "Download Image" actions also return processed results.

Current userscript boundaries:

Skill

For workflows that involve AI coding agents:

pnpm dlx skills add GargantuaX/gemini-watermark-remover --skill gemini-watermark-remover
node skills/gemini-watermark-remover/scripts/run.mjs remove <input> --output <file>

CLI

For scripting, CI, and local batch workflows, use the direct CLI:

# repo-local
node bin/gwr.mjs remove <input> --output <file>

# installed globally
gwr remove <input> [--output <file> | --out-dir <dir>] [--overwrite] [--json]

Video exports default to the repository's calibrated 12 Mbps AVC profile. For a quality-sensitive source, request a higher encoder target explicitly:

gwr remove input.mp4 --output clean.mp4 --video-bitrate-mbps 20

The CLI reports video frame progress on stderr. --video-timeout-ms is an inactivity timeout: an export may run longer than that value as long as frames continue to advance.

If you do not have gwr installed globally, use:

pnpm dlx @pilio/gemini-watermark-remover remove <input> --output <file>

The default CLI file decoder/encoder uses sharp. SDK consumers that only use browser or ImageData APIs do not need it. If you use the CLI file path in your own project, install sharp alongside this package:

pnpm add sharp

Can't Remove Your Watermark?

This tool targets Gemini's visible watermark (the semi-transparent logo in the bottom-right corner). If your image watermark doesn't match a known Gemini format, or you need to remove other types of image watermarks, try the general-purpose AI watermark remover:

👉 pilio.ai/image-watermark-remover

Developer Preview

The repository still keeps a local internal preview harness at /dev-preview.html for single-image comparison, copy, and download verification.

Development

# Install dependencies
pnpm install

# Development build
pnpm dev

# Production build
pnpm build

# Local static serving
pnpm serve

Notes:

Tampermonkey Debugging on macOS

For the repo's fixed-profile workflow on macOS:

# Build the latest userscript
pnpm build

# Start a local dist server if needed
pnpm dev

# Open the fixed Chrome profile with remote debugging enabled
./scripts/open-fixed-chrome-profile.sh --url https://gemini.google.com/app

Notes:

SDK Usage (Advanced / Internal)

The package root still exposes an SDK, but this path is intended for advanced or internal integration scenarios:

import {
  createWatermarkEngine,
  removeWatermarkFromImage,
  removeWatermarkFromImageData,
  removeWatermarkFromImageDataSync,
} from '@pilio/gemini-watermark-remover';

Use the pure-data API when you already have decoded ImageData:

const result = await removeWatermarkFromImageData(imageData, {
  adaptiveMode: 'auto',
});

console.log(result.meta.decisionTier);

Use the browser image API when you have an HTMLImageElement or HTMLCanvasElement:

const { canvas, meta } = await removeWatermarkFromImage(imageElement);
document.body.append(canvas);
console.log(meta.applied, meta.decisionTier);

If you need to process many images, reuse a single engine instance so alpha maps stay cached:

const engine = await createWatermarkEngine();
const first = await removeWatermarkFromImageData(imageDataA, { engine });
const second = await removeWatermarkFromImageData(imageDataB, { engine });

For Node.js integrations, use the dedicated subpath and inject your own decoder/encoder:

import { removeWatermarkFromBuffer } from '@pilio/gemini-watermark-remover/node';

const result = await removeWatermarkFromBuffer(inputBuffer, {
  mimeType: 'image/png',
  decodeImageData: yourDecodeFn,
  encodeImageData: yourEncodeFn,
});

Runtime Requirements

Web And Userscript

CLI And Skill

node bin/gwr.mjs remove <input> --output <file>
node skills/gemini-watermark-remover/scripts/run.mjs remove <input> --output <file>

Testing

# Run all tests
pnpm test

Regression tests include image fixtures from src/assets/samples/. Source samples stay in git. Naming and retention rules for those fixtures are documented in src/assets/samples/README.md. Complex preview/download validation notes are documented in docs/complex-figure-verification-checklist.md. Local files under src/assets/samples/fix/ are optional snapshot outputs for manual regression checks and are intentionally not tracked by git.

Release Notes

See CHANGELOG.md for release history and RELEASE.md for the local release checklist. The latest post-release closeout is documented in docs/release-1.0.29-post-release.md.

How Gemini Watermark Removal Works

The Gemini Watermarking Process

Gemini applies watermarks using standard alpha compositing:

$$watermarked = \alpha \cdot logo + (1 - \alpha) \cdot original$$

Where:

The Reverse Solution

To remove the watermark, we solve for original:

$$original = \frac{watermarked - \alpha \cdot logo}{1 - \alpha}$$

By capturing the watermark on a known solid background, we reconstruct the exact Alpha map and apply the inverse formula to restore the original pixels with zero loss.

Detection Rules

The engine uses layered detection to locate and verify watermarks:

  1. Size catalog lookup — matches image dimensions against Gemini's known output sizes to predict watermark size and position.
  2. Local anchor search — refines the predicted position by scanning pixel data around the expected watermark region.
  3. Restoration validation — confirms the detected watermark is real before applying removal, avoiding false positives.

Default watermark configurations:

Condition Watermark Size Right Margin Bottom Margin
Larger Gemini outputs 96×96 64px 64px
Smaller Gemini outputs 48×48 32px 32px

Project Structure

gemini-watermark-remover/
├── bin/                   # Published CLI entrypoint (`gwr`)
├── public/
│   ├── index.html         # Entry page for official site / userscript / internal preview
│   ├── dev-preview.html   # Internal browser preview harness kept for local debugging
│   └── tampermonkey-worker-probe.*  # Probe pages for userscript/debug flows
├── skills/
│   └── gemini-watermark-remover/    # Distributable agent skill bundle
├── src/
│   ├── assets/            # Calibration assets and regression samples
│   ├── cli/               # CLI argument parsing and file workflows
│   ├── core/              # Watermark math, scoring, and restoration
│   ├── page/              # Page-side runtime for Gemini page integration
│   ├── sdk/               # Advanced/internal SDK surface
│   ├── shared/            # Shared DOM, blob, and session helpers
│   ├── userscript/        # Userscript entrypoints and browser hooks
│   ├── workers/           # Worker runtime
│   ├── app.js             # Internal single-image preview harness entry point
│   └── utils.js           # Shared browser helpers for the internal preview page
├── tests/                 # Unit, regression, packaging, and smoke tests
├── scripts/               # Local automation and debug launchers
├── dist/                  # Build output directory
├── build.js               # Build script
└── package.json

Architecture Overview


Limitations

This project is released under the MIT License.

The removal of watermarks may have legal implications depending on your jurisdiction and the intended use of the images. Users are solely responsible for ensuring their use of this tool complies with applicable laws, terms of service, and intellectual property rights.

The author does not condone or encourage the misuse of this tool for copyright infringement, misrepresentation, or any other unlawful purposes.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY ARISING FROM THE USE OF THIS SOFTWARE.

Credits

This project is a JavaScript port of the Gemini Watermark Tool by Allen Kuo (@allenk).

The Reverse Alpha Blending method and calibrated watermark masks are based on the original work © 2024 AllenK (Kwyshell), licensed under MIT License.

License

MIT License

gemini-watermark-remover (GargantuaX/gemini-watermark-remover)

Searching Database…

这是什么?这是一款开源工具,使用数学上精确的 Reverse Alpha Blending 算法去除 Gemini AI 图片的水印(也支持视频),而不是采用 AI 图像修复。它提供在线工具、Chrome 扩展、用户脚本、命令行工具(CLI)和 SDK 等多种形式。
这是一个应用,还是几个不同的工具?它围绕同一个核心引擎提供多种使用形式:网页应用、Chrome 扩展、Tampermonkey 用户脚本、命令行工具(gwr)、智能体 Skill,以及 JavaScript SDK。
我到底该怎么去除水印?最简单的方法是打开 geminiwatermarkremover.io,把你的 Gemini 图片拖进去(处理视频则使用 /video 页面)。如果想直接在 Gemini 页面内自动处理,请从 Chrome 网上应用店安装 Chrome 扩展,或通过 Tampermonkey 添加用户脚本。
使用命令行工具需要先安装什么吗?命令行工具需要本地的 Node.js 运行环境。如果你使用命令行的文件处理方式,它默认的文件解码器和编码器依赖 sharp 包,需要随本包一起安装;如果是浏览器或 SDK 使用者,通过 ImageData 接口调用,则不需要它。
它会去除图片上的所有水印吗?不会。它只针对 Gemini 目前可见的右下角标志水印,不处理 SynthID 等不可见或隐写式标记;而且只有输出尺寸符合 Gemini 已知尺寸目录时,才能可靠工作。
支持哪些浏览器?网页工具和用户脚本可在现代版 Chrome、Firefox、Safari 和 Edge 中运行,而命令行工具和 SDK 则运行在 Node.js 环境中。
我的图片会被上传到什么地方吗?不会。所有处理(包括视频)都在你的浏览器或本机上完成,任何内容都不会发送到服务器。
这种水印去除究竟是如何工作的?它逆向运用了 Gemini 的 alpha 合成公式:先在纯色背景上采集已知的水印标志,重建出精确的 alpha 蒙版,再求解出原始像素值,从而无损还原图片,而不是靠 AI 图像修复去猜测。
它也能处理 Gemini 生成的视频吗?可以。在线工具有专门的视频模式(geminiwatermarkremover.io/video),它会逐帧检测并去除水印,全部运行在浏览器中。
AI 编程智能体可以用的内置 Skill 是什么?它是位于 skills/gemini-watermark-remover/ 下的打包 Skill,智能体可以通过 skills.sh 发现并调用它。它封装了命令行工具的调用边界,因此智能体无需导入仓库内部代码,就能自动去除水印。
它能去除 Gemini 以外其他 AI 工具的水印吗?不能。它专门用于检测 Gemini 右下角的标志水印;对于其他类型的水印,README 推荐使用另一款通用型工具 pilio.ai/image-watermark-remover。
Creator
GargantuaX
Size
441.7 MB
Stars
5.7K
Age
9mo
Commits · 90 Days