File size: 1,685 Bytes
7c22697
 
 
 
db8bf1e
 
 
 
 
 
 
 
71f09e6
7c22697
 
a92e917
db8bf1e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
tags:
- model_hub_mixin
- pytorch_model_hub_mixin
- watermarking
- latent-diffusion
- stable-signature
- watermark-extraction
- computer-vision
- research
- non-commercial
- pytorch
license: cc-by-nc-4.0
---

# **MsgExtractor - Stable Signature Decoder**

**A version of the Stable Signature decoder from the Meta AI project “Stable Signature: Rooting Watermarks in Latent Diffusion Models.”**

---

##  Model Summary

* **Model Type:** Custom PyTorch Model
* **Task:** Watermark extraction from watermarked images
* **Source:** Derived from [facebookresearch/stable_signature](https://github.com/facebookresearch/stable_signature)
* **License:** **CC-BY-NC 4.0** (Attribution + Non-Commercial)
* **Framework:** PyTorch
* **Weights:** Ported from the original TorchScript decoder
* **Architecture:**

  * `HiddenDecoder(num_blocks, num_bits, channels, redundancy)`
  * `MsgExtractor(hidden_decoder, in_features, out_features)`
* **Status:** Research-only, non-commercial

### **Load the model**

```python
from modeling_msg_extractor import MsgExtractor
import torch

model = MsgExtractor.from_pretrained("ESmike/StableSignatureDecoder")
model.eval()

img = torch.randn(1, 3, 256, 256)   # example input
bits = model(img)
print(bits.shape)
```

### Citation

If you use this model, you must cite the original Stable Signature paper:

```bibtex
@inproceedings{Fernandez2023StableSignature,
  title={The Stable Signature Rooting Watermarks in Latent Diffusion Models},
  author={Fernandez, Pierre and Chappelier, Vivien and Nguyen-Hong, Son},
  year={2023},
  institution={Meta AI},
  note={Original implementation at https://github.com/facebookresearch/stable_signature}
}
```