stable_signature  by facebookresearch

Research paper implementation for watermarking latent diffusion models

created 2 years ago
455 stars

Top 67.4% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides the official implementation for "The Stable Signature," a method for embedding robust watermarks within Latent Diffusion Models (LDMs). It enables users to embed and extract hidden messages in image generation pipelines, offering a way to trace or protect AI-generated content.

How It Works

The Stable Signature embeds watermarks by fine-tuning the decoder of an LDM. This approach modifies the decoder's weights to encode a binary message, which can then be extracted from generated images. The method prioritizes robustness against common image manipulations while maintaining high perceptual quality.

Quick Start & Requirements

  • Installation: Clone the repository and install dependencies using conda and pip.
  • Core Dependencies: Python 3.8, PyTorch 1.12.0, CUDA 11.3.
  • Data: Requires a dataset (e.g., COCO) for fine-tuning the LDM decoder.
  • Models: Downloadable pre-trained watermark extractor models (.pth and .torchscript.pt formats) are provided.
  • Resources: Setup involves downloading models and potentially fine-tuning on a custom dataset.
  • Links: Webpage, arXiv, Blog, Demo

Highlighted Details

  • Fine-tunes LDM decoders for watermark embedding.
  • Provides extractor models with varying robustness (e.g., against blur and rotations).
  • Includes scripts for fine-tuning, generation with watermarked weights, and evaluation.
  • Supports integration with Stability AI's Stable Diffusion codebase and the Diffusers library.

Maintenance & Community

  • Developed by Meta AI (facebookresearch).
  • The project is based on Stability AI's stablediffusion and PerceptualSimilarity repositories.

Licensing & Compatibility

  • License: CC-BY-NC for the majority of the project. src/ldm and src/taming are MIT licensed.
  • Compatibility: The CC-BY-NC license restricts commercial use.

Limitations & Caveats

The project's primary license (CC-BY-NC) prohibits commercial use. Integration with the Diffusers library is noted as "Still WIP" and may require future updates.

Health Check
Last commit

6 months ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
19 stars in the last 90 days

Explore Similar Projects

Starred by Dan Abramov Dan Abramov(Core Contributor to React), Patrick von Platen Patrick von Platen(Core Contributor to Hugging Face Transformers and Diffusers), and
28 more.

stable-diffusion by CompVis

0.1%
71k
Latent text-to-image diffusion model
created 3 years ago
updated 1 year ago
Feedback? Help us improve.