facebookresearch/stable_signature

Official implementation of the paper "The Stable Signature Rooting Watermarks in Latent Diffusion Models"

What it solves

This project provides a method for embedding invisible watermarks into images generated by Latent Diffusion Models (LDMs), such as Stable Diffusion. It addresses the problem of identifying AI-generated content by rooting the watermark directly into the model's decoder, ensuring that every image the model produces is automatically watermarked without needing a separate post-processing step.

How it works

Instead of adding a watermark after the image is generated, this system fine-tunes the LDM's decoder. By training the decoder to produce images that contain a hidden signature, the watermark becomes an intrinsic part of the generation process. The project includes tools to fine-tune the decoder using a dataset (like COCO) and a watermark extractor model to retrieve the hidden message from the generated images.

Who it’s for

Researchers and developers working on AI safety, content provenance, and generative AI who need a way to reliably track and identify images produced by specific diffusion models.

Highlights

  • Integrated Watermarking: Embeds signatures directly into the model's decoder rather than as a post-hoc addition.
  • Robustness: Includes extractor models trained to handle common image attacks like blur and rotations.
  • Compatibility: Works with Stable Diffusion v1 and v2, and integrates with both the Stability AI codebase and the Diffusers library.
  • Evaluation Tools: Provides scripts to measure bit accuracy and image quality metrics (PSNR, SSIM, LPIPS) to ensure the watermark remains invisible.