Sign In

Watermarks Are Poisoning Your LoRAs (and How to Clean a Dataset Locally)

1

Watermarks Are Poisoning Your LoRAs (and How to Clean a Dataset Locally)

You scrape forty reference images for a character or concept LoRA. A third of them have a site logo baked into a corner, a URL across the bottom, an @username stamped over the hip. You caption them, you train, and now every few generations comes out with a faint watermark ghosting across it — because the model faithfully learned that this subject “usually has grey text in the corner.”

Overlaid marks are one of the most common, and most invisible, ways a scraped dataset sabotages a LoRA. They don’t show up in your caption review. They show up 300 steps into a sample grid, and by then they’re baked into the weights.

Why “just crop it” isn’t a plan

Cropping a corner out by hand is fine for one image, miserable across fifty, and useless when the mark sits somewhere you can’t crop without cutting into the subject. So most people eyeball a few, give up, and hope. The result is a model that has quietly learned someone else’s watermark as part of your character.

Find → Review → Clean, and nothing leaves your machine

LoRA Dataset Studio is a free, open-source, local app for building LoRA datasets, and it has a watermark pass built for exactly this problem. It lives on scraped concept/style datasets — where overlaid marks actually turn up — and it works in three deliberate stages.

🧹 Find

A local vision model (Qwen3-VL, through Ollama) scans your kept images and flags each overlaid mark with a 🚩 badge and a stored bounding box. It deletes nothing. And it is narrow on purpose: it targets logos, URLs and @usernames laid on top of the photo — not scene text like a shop sign or a slogan printed on a t-shirt, which belong in the shot and should train.

The Find pass flags four overlaid watermarks with a red-flag badge and leaves two clean shots alone

The 🧹 Find pass over a scraped set: the four shots carrying an overlaid mark get a 🚩 badge; the two clean ones are left untouched. Clean (4) and Review flagged (4) only appear once there’s something to act on. (Everyone here is AI-generated and doesn’t exist; the SAMPLE-SITE.COM marks are fakes stamped on for the demo.)

🧹 Clean

Each flagged image is routed by cost and risk — no generative guesswork:

  • a mark in an outer border band is cropped off: a pure pixel crop that invents nothing, and never cuts a side below 768px (training’s aspect-ratio bucketing absorbs the new shape);

  • a small off-centre mark is inpainted with LaMa: a non-generative fill where only the masked pixels change, run on your CPU;

  • anything large, or sitting on the subject, is left for manual review instead of risking a bad auto-edit.

Every edited image keeps its watermarked original as a .orig sibling, and Clean hands back one honest summary: cropped / inpainted / needs review / failed.

🔍 Review

Detectors get it wrong sometimes, and you should have the last word. A lightbox steps through the flagged shots one at a time, draws the detected box on the image, shows the action it plans to take, and lets you Clean it (and see the cleaned result before moving on), dismiss it as a false positive — which clears the flag so future Find passes never re-raise it — or reject the shot outright. Keyboard shortcuts, so fifty images isn’t fifty minutes.

Review lightbox: the detected watermark is boxed and the planned action named

Review mode draws the detected box on each flagged shot and names the planned action (here: inpaint with LaMa) — then it’s your call: Clean, “Not a watermark”, or Reject.

The same shot after Clean, watermark inpainted away

…and the same shot after Clean: the mark is gone, and the watermarked original is kept as a .orig backup in case you disagree.

LaMa inpainting is an optional extra. Without it, Clean still crops border marks and simply skips the off-centre ones, and a one-click ↓ Install inpainting button (CPU-only, one-time download) adds it. On-subject removal is a deliberate V2 — V1 never repaints over the subject, because a bad repaint on the exact thing you are training is worse than the watermark was.

Every step runs locally: Find on your own Ollama, Clean on your own CPU. Your reference images never leave the machine — which, for a lot of the datasets built around here, is the entire point.

One honest caveat

This is dataset hygiene for training you are entitled to do. Stripping an overlaid mark stops it poisoning the model; it doesn’t make anything you scraped yours. You are responsible for the rights to what you train on — the project’s responsible-use notes spell out where that line sits.

Where it fits

The watermark pass is one stop in a pipeline that takes you from a single reference photo (or a scrape) to a trained, ranked LoRA without leaving the browser tab:

  • Source — generate variations from one reference (Nano Banana Pro, ChatGPT, or local Klein), or scrape/import real images;

  • Curate — a live 12 / 6 / 6 / 1 composition meter, with InsightFace scoring flagging off-identity shots before they train;

  • Caption — automatically, in the right form for your model (prose for Z-Image/Krea/FLUX, booru tags for SDXL);

  • Train — five families, no config file to hand-tune: Z-Image, SDXL, Krea 2, FLUX.1 and FLUX.2 Klein — locally, or on a rented vast.ai GPU for about $1–2 a run;

  • Test — Test Studio grid-tests checkpoints and ranks them by face similarity, so you pick the best epoch instead of guessing.

It is MIT-licensed and built in the open. The Discord #roadmap is where features get proposed — and they tend to land fast; the watermark tool in this article shipped the day it was suggested.

If a watermark has ever ghosted its way into your outputs, this is the fifteen-second fix — and the original is always one .orig file away if you disagree with the machine.

1