Skip to content

About

Official repository for the paper "Forging and Removing Latent-Noise Diffusion Watermarks Using a Single Image".

Resources

Stars

7 stars

Watchers

1 watching

Forks

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forging and Removing Latent-Noise Diffusion Watermarks Using a Single Image

This repository contains the official codebase for the paper "Forging and Removing Latent-Noise Diffusion Watermarks Using a Single Image". We provide an approach to forge and remove latent noise based diffusion watermarks. You can read more about the approach in our paper ArXiv

Watermarking methods attacked:

We specifically focus on the following latent-noise based watermarking schemes -

  1. Tree-Ring
  2. Gaussian Shading
  3. Ring-ID
  4. WIND

Running Attacks on Tree-Ring Watermarking Scheme

To run the forgery attack on SDv2.1 using the VAE from SDv1.4 use the following script. To update the VAE utilized for optimization you can update this in the parameter --vae_optimization. You can update the model you want to attack using the parameter --pretrained_model_name_or_path. We also utilize a hyper-parameter lambda in our optimization this can be controlled using the parameter --lamda.

python3 Tree-Ring/forgery.py --lamda 1e4 --start_iter 0 --end_iter 200 --pretrained_model_name_or_path "stabilityai/stable-diffusion-2-base" --vae_optimization "CompVis/stable-diffusion-v1-4" --outdir forged_images

Similarly you can run the removal attack using the following command:

python3 Tree-Ring/removal.py --lamda 1e4 --start_iter 0 --end_iter 200 --pretrained_model_name_or_path "stabilityai/stable-diffusion-2-base" --vae_optimization "CompVis/stable-diffusion-v1-4" --outdir forged_images

Running Attacks on Gaussian Shading Watermarking Scheme

To run the forgery attack on the Gaussian Shading watermarking scheme, use the following command:

python3 Gaussian-Shading/forgery.py --lamda 1e4 --start_iter 0 --end_iter 200 --pretrained_model_name_or_path "stabilityai/stable-diffusion-2-base" --vae_optimization "CompVis/stable-diffusion-v1-4" --outdir forged_images

Similarly you can run the removal attack using the following command:

python3 Gaussian-Shading/removal.py --lamda 1e4 --start_iter 0 --end_iter 200 --pretrained_model_name_or_path "stabilityai/stable-diffusion-2-base" --vae_optimization "CompVis/stable-diffusion-v1-4" --outdir forged_images

Running Attacks on RingID Watermarking Scheme

To run the forgery attack on the RingID watermarking scheme, use the following command:

python3 RingID/forgery.py --lamda 1e4 --start_iter 0 --end_iter 200 --pretrained_model_name_or_path "stabilityai/stable-diffusion-2-base" --vae_optimization "CompVis/stable-diffusion-v1-4" --outdir forged_images

Similarly you can run the removal attack using the following command:

python3 RingID/removal.py --lamda 1e4 --start_iter 0 --end_iter 200 --pretrained_model_name_or_path "stabilityai/stable-diffusion-2-base" --vae_optimization "CompVis/stable-diffusion-v1-4" --outdir forged_images

Running Attacks on WIND Watermarking Scheme

To run the forgery attack on the WIND watermarking scheme, use the following command:

python3 WIND/forgery.py --lamda 1e4 --start_iter 0 --end_iter 200 --pretrained_model_name_or_path "stabilityai/stable-diffusion-2-base" --vae_optimization "CompVis/stable-diffusion-v1-4" --outdir forged_images

Similarly you can run the removal attack using the following command:

python3 WIND/removal.py --lamda 1e4 --start_iter 0 --end_iter 200 --pretrained_model_name_or_path "stabilityai/stable-diffusion-2-base" --vae_optimization "CompVis/stable-diffusion-v1-4" --outdir forged_images

About

Official repository for the paper "Forging and Removing Latent-Noise Diffusion Watermarks Using a Single Image".

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages