SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.00230 · 2024

Latent Watermark: Inject and Detect Watermarks in Latent Diffusion Space

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 10 functions out of this paper's own repositories and ran 10 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
richardsunnymeng/latentwatermark canonical 10 of 10
FunctionStatusWhere it lives
collate_fn Ran richardsunnymeng/latentwatermark/utils/collate_fn.py
pointer only (licence: NONE) · get_code("3907a9f2cba334bb")
conv1x1 Ran richardsunnymeng/latentwatermark/models/extractors/naive.py
pointer only (licence: NONE) · get_code("2a80220dabcb742a")
conv3x3 Ran richardsunnymeng/latentwatermark/models/extractors/naive.py
pointer only (licence: NONE) · get_code("d33c6bd60a77ad21")
get_param_groups_and_shapes Ran richardsunnymeng/latentwatermark/utils/fp16_util.py
pointer only (licence: NONE) · get_code("1519c26f915f04ae")
load_and_precess_imgs Ran richardsunnymeng/latentwatermark/extract.py
pointer only (licence: NONE) · get_code("0aa86a0369202eac")
make_master_params Ran richardsunnymeng/latentwatermark/utils/fp16_util.py
pointer only (licence: NONE) · get_code("751bef182a1751e2")
msg_bce_loss Ran richardsunnymeng/latentwatermark/loss/loss_fn.py
pointer only (licence: NONE) · get_code("475678a8f4905fe7")
msg_lse_loss Ran richardsunnymeng/latentwatermark/loss/loss_fn.py
pointer only (licence: NONE) · get_code("82d651ea5f8175c5")
msg_reg_loss Ran richardsunnymeng/latentwatermark/loss/loss_fn.py
pointer only (licence: NONE) · get_code("fa1f406db7aa603e")
unflatten_master_params Ran richardsunnymeng/latentwatermark/utils/fp16_util.py
pointer only (licence: NONE) · get_code("64fff1e30802b815")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Watermarking is a tool for actively identifying and attributing the images generated by latent diffusion models. Existing methods face the dilemma of image quality and watermark robustness. Watermarks with superior image quality usually have inferior robustness against attacks such as blurring and JPEG compression, while watermarks with superior robustness usually significantly damage image quality. This dilemma stems from the traditional paradigm where watermarks are injected and detected in pixel space, relying on pixel perturbation for watermark detection and resilience against attacks. In this paper, we highlight that an effective solution to the problem is to both inject and detect watermarks in the latent diffusion space, and propose Latent Watermark with a progressive training strategy. It weakens the direct connection between quality and robustness and thus alleviates their contradiction. We conduct evaluations on two datasets and against 10 watermark attacks. Six metrics measure the image quality and watermark robustness. Results show that compared to the recently proposed methods such as StableSignature, StegaStamp, RoSteALS, LaWa, TreeRing, and DiffuseTrace, LW not only surpasses them in terms of robustness but also offers superior image quality. Our code will be available at https://github.com/RichardSunnyMeng/LatentWatermark.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2404.00230")
get_code_for_paper("2404.00230")
have("2404.00230")

Connect an agent — have() is free.