stable_signature  by facebookresearch

Research paper implementation for watermarking latent diffusion models

Created 2 years ago
465 stars

Top 65.3% 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

8 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
2
Star History
8 stars in the last 30 days

Explore Similar Projects

Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), Christian Laforte Christian Laforte(Distinguished Engineer at NVIDIA; Former CTO at Stability AI), and
3 more.

taesd by madebyollin

0.3%
779
Tiny AutoEncoder for Stable Diffusion latents
Created 2 years ago
Updated 5 months ago
Starred by Alex Yu Alex Yu(Research Scientist at OpenAI; Former Cofounder of Luma AI) and Phil Wang Phil Wang(Prolific Research Paper Implementer).

Cosmos-Tokenizer by NVIDIA

0.1%
2k
Suite of neural tokenizers for image and video processing
Created 10 months ago
Updated 7 months ago
Starred by Dan Abramov Dan Abramov(Core Contributor to React; Coauthor of Redux, Create React App), Patrick von Platen Patrick von Platen(Author of Hugging Face Diffusers; Research Engineer at Mistral), and
57 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.