Lab Reports · Image provenance
Do Watermarks Survive FLUX Edits?
We embedded three invisible watermarks in an AI-generated image, then ran it through upscalers, diffusion img2img and an instruction-following edit model. The expectation going in was that a model which redraws the image from noise would erase a pixel watermark. For the edit model, it did not.
Upscaling preserves the watermark
Lanczos, 4x-UltraSharp and RealESRGAN all left both learned watermarks fully readable after scaling back to the original size.
The instruction edit preserves it too
FLUX.3 Klein recolored the apple and shifted the tone of the whole frame (28 dB PSNR). The WAM payload still decoded perfectly across 93% of the image.
img2img erases it
At denoise 0.4 neither learned scheme is reliably detected. At 0.6, shown here, WAM recovers 18 of 32 bits: chance.
Setup
We generated one 1024 × 1024 still life with FLUX.3 Klein and made three watermarked copies, one per scheme. Every copy carries the same 32-bit payload. All three marks are invisible, at 39.6 to 40.6 dB PSNR against the original.
- WAM
- Meta's Watermark Anything, MIT checkpoint at default strength. A learned embedder and extractor that also predicts where in the image the watermark is, so it reports partial survival.
- RivaGAN
- A learned encoder and decoder from the
invisible-watermarkpackage, trained to resist common image edits. - DWT-DCT
- The classical frequency-domain scheme from the same package, used by early Stable Diffusion releases. Included as a baseline.
- Edit model
- FLUX.3 Klein (int8) in ComfyUI 0.44 with the Qwen3-VL 4B text encoder and the FLUX.2 VAE. 16 Euler steps, CFG 1.0, fixed seed.
- Metric
- Bits of the payload recovered. 16 of 32 is chance. We call a mark detected at 27 of 32 or better, which an unmarked image reaches by chance about once in 18,000 trials.
Outputs at a different size were resized back to 1024 × 1024 with Lanczos before decoding, the same normalization a production detector applies. The composite case pastes a 240 × 230 region around the apple from the Klein edit onto the watermarked original, as a masked inpainting workflow would.





Results
| Transform | PSNR (dB) | WAM | RivaGAN | DWT-DCT |
|---|---|---|---|---|
| Resampling and compression | ||||
| Untouched | — | 32/32100% of frame | 32/32 | 24/32 |
| JPEG, quality 75 | 36.3 | 32/32100% of frame | 32/32 | 14/32 |
| Lanczos 2× upscale | 48.5 | 32/32100% of frame | 32/32 | 21/32 |
| Lanczos ½ downscale | 34.1 | 32/32100% of frame | 32/32 | 22/32 |
| 4x-UltraSharp (ESRGAN) | 37.5 | 32/32100% of frame | 32/32 | 20/32 |
| RealESRGAN x4plus | 33.4 | 32/32100% of frame | 32/32 | 17/32 |
| Diffusion passes | ||||
| VAE encode → decode | 39.6 | 32/32100% of frame | 32/32 | 19/32 |
| img2img, denoise 0.2 | 24.2 | 32/3277% of frame | 27/32 | 13/32 |
| img2img, denoise 0.4 | 20.1 | 25/324% of frame | 20/32 | 12/32 |
| img2img, denoise 0.6 | 17.5 | 18/325% of frame | 16/32 | 16/32 |
| Instruction edits | ||||
| Klein edit, apple red → green | 28.2 | 32/3293% of frame | 31/32 | 19/32 |
| Edited patch composited onto original | 31.5 | 32/3297% of frame | 32/32 | 23/32 |
| Control | ||||
| Never watermarked | — | 15/320% of frame | 12/32 | 11/32 |
PSNR compares each output with its watermarked input, measured on the WAM copy; lower means more pixels changed. Green marks a detection (27/32 or better), amber a weak signal (25–26/32). The percentage under each WAM score is the share of the frame the extractor marked as watermarked.
Analysis
Pixel change does not predict survival
The Klein edit changed the image more than JPEG compression and far more than a VAE round trip, yet the learned marks came through intact. img2img at denoise 0.4 changed it more again, and the marks were gone. The deciding factor is whether the model is trained to reproduce its input, not how far the pixels moved.
Why the edit model carries the mark
Two measurements explain it. The FLUX.2 VAE alone preserves both learned watermarks perfectly, so the signal survives the move into latent space. Klein is trained to keep everything the instruction does not mention identical to the reference, so it reproduces the reference latent faithfully, watermark included. The sampler starts from noise, but it is conditioned on a latent that already carries the signal.
img2img works differently. It starts from the source latent with noise added on top, and nothing in its objective asks the model to restore fine structure it can no longer see. The noise drowns the watermark and the model fills the gap with new detail.
Upscalers keep the coarse signal
Both learned schemes place their payload in mid-frequency structure that survives resampling, because resizing is among the distortions they were trained against. ESRGAN-style models add synthesized high-frequency detail but keep the structure underneath, which is where the mark is stored.
The classical scheme is not robust
DWT-DCT recovered only 24 of 32 bits from the untouched watermarked file. It fails before any edit is applied, consistent with the field's move to learned schemes.
Limits
- One image, one seed and one edit instruction. A larger edit, such as a new background or a changed pose, regenerates more of the frame and may behave differently.
- Only open research watermarks were tested. Commercial schemes such as Microsoft's InvisMark and Google's SynthID use different designs, and their detectors are not public.
- Other edit models may reproduce their reference less faithfully than Klein.
- Each scheme ran at its default strength. Stronger embedding trades visibility for robustness.
Method
Generation and every diffusion step ran in ComfyUI on an NVIDIA GB10. Watermark embedding and detection ran on CPU with PyTorch, the invisible-watermark package and the Watermark Anything reference code. ComfyUI graphs were submitted through its HTTP API: a VAE encode and decode; img2img through KSampler at denoise 0.2, 0.4 and 0.6 with the scene prompt; a Klein edit through ReferenceMultiLatent at denoise 1.0 with the watermarked image as the only reference; and both upscale models through ImageUpscaleWithModel. JPEG compression, Lanczos resizing and the patch composite were done in Pillow.
