Instructions to use Lightricks/LTX-2-Marking with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- AudioSeal
How to use Lightricks/LTX-2-Marking with AudioSeal:
# Watermark Generator from audioseal import AudioSeal model = AudioSeal.load_generator("Lightricks/LTX-2-Marking") # pass a tensor (tensor_wav) of shape (batch, channels, samples) and a sample rate wav, sr = tensor_wav, 16000 watermark = model.get_watermark(wav, sr) watermarked_audio = wav + watermark# Watermark Detector from audioseal import AudioSeal detector = AudioSeal.load_detector("Lightricks/LTX-2-Marking") result, message = detector.detect_watermark(watermarked_audio, sr) - Notebooks
- Google Colab
- Kaggle
File size: 6,328 Bytes
718f58d | 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 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | ---
license: mit
library_name: pytorch
tags:
- watermarking
- video
- audio
- videoseal
- pixelseal
- audioseal
- ltx-2
---
# LTX-2 Marking Pack (VideoSeal / AudioSeal)
Weights and configs for the opt-in, post-hoc invisible marking used by [LTX-2](https://github.com/Lightricks/LTX-2): **PixelSeal** (VideoSeal family) for video frames and **AudioSeal** for stereo PCM.
This repository contains **weights only**. The code that loads, embeds, and detects lives in the public LTX-2 repository under [`packages/ltx-pipelines/src/ltx_pipelines/marking`](https://github.com/Lightricks/LTX-2/tree/main/packages/ltx-pipelines/src/ltx_pipelines/marking). Full documentation is in [`packages/ltx-pipelines/docs/marking.md`](https://github.com/Lightricks/LTX-2/blob/main/packages/ltx-pipelines/docs/marking.md).
> The marks are **not** cryptographic signatures. They are a robust, invisible signal that a clip was produced by an LTX-2 pipeline with marking enabled. Absence of a detected mark does not prove a clip was not generated.
## Files
The LTX-2 loader (`create_markers`) requires all five model files to be present in one directory.
| File | Description | SHA-256 |
|:--|:--|:--|
| `pixelseal.pth` | PixelSeal embedder + extractor weights (model state only) | `97cff15f75515259b49a2cffc8fcd600c287cafe3f29c1d5c6ef9c81b492c088` |
| `pixelseal.yaml` | PixelSeal model card (architecture, 256-bit payload, 256 px processing size) | `96c4a448f7d81810780e5bde5a51b039db544b7ec2baf65a605302c1b17362c9` |
| `videoseal_attenuation.yaml` | JND attenuation channel map referenced by the card | `e0d71354f8945cf600bd4ebd5e2641a9c879e017548dd6cc8a6de10239d7e821` |
| `audioseal_generator.pth` | AudioSeal 16-bit generator (embed) | `7a845b5fbe9364a63a3909d8ab3fe064d13a76ae4c2e983573e08c69b7b51748` |
| `audioseal_detector.pth` | AudioSeal 16-bit detector | `8a78e8a83584113523e161fc599fcab10fd0e94c04d2eb9d2fa1e9ec91ab69d9` |
| `LICENSE-videoseal`, `LICENSE-audioseal` | Upstream MIT licenses | |
`.pth` files are PyTorch pickles. Verify the checksums after download and load them only from this repository:
```bash
sha256sum pixelseal.pth pixelseal.yaml videoseal_attenuation.yaml audioseal_generator.pth audioseal_detector.pth
```
## Usage
### Install
Clone [LTX-2](https://github.com/Lightricks/LTX-2) and install the marking extras:
```bash
uv sync --extra videoseal --extra audioseal
# or
pip install 'ltx-pipelines[videoseal,audioseal]'
```
### Download the pack
The LTX-2 library never downloads weights itself. Fetch this repository to a local directory:
```bash
hf download Lightricks/LTX-2-Marking --local-dir path/to/marking
```
### Mark during generation
Video-generation and editing CLIs, HDR IC-LoRA, and text-to-audio accept `--marker-root-path`. Omit the flag to leave pixels and PCM unchanged.
```bash
python -m ltx_pipelines.distilled \
... \
--marker-root-path path/to/marking \
--output-path out.mp4
```
Pipeline-specific behavior:
- **HDR:** video marking is skipped; audio is still marked.
- **Audio-to-video:** only the video is marked, because the source audio is passed through.
- **Text-to-audio:** only the audio marker is used.
### Detect
```python
import torch
from ltx_pipelines.marking import create_markers, detect_audio_mark, detect_video_mark
video_marker, audio_marker = create_markers("path/to/marking", torch.device("cuda"))
print(detect_video_mark(video_marker, "out.mp4"))
print(detect_audio_mark(audio_marker, "out.mp4"))
```
Each call returns `MarkDetectResult(detected, bit_accuracy, p_value, payload)`. `bit_accuracy` and `p_value` come from a binomial test of the decoded bits against the payload, which is fixed in the LTX-2 code (not in these weights). `detected` is each marker's own decision:
- **Video:** every 8th decoded frame is resized to 256×256 and run through the extractor; bit logits are averaged over the sampled frames. `detected` is `log10(p_value) < -6`.
- **Audio:** the full track is scanned, with each stereo channel processed as its own mono signal. `detected` means at least half of the samples have a watermark probability above 0.5.
Detection runs on CPU or GPU. A GPU is much faster: on one B200, video detect takes about 15–30 ms per 5–10 s clip at up to 4K, versus 0.6–3 s on CPU. Both figures exclude file decoding.
## Scope and limitations
- Video marking targets SDR H.264 output; HDR output is not video-marked.
- AudioSeal runs at the native 24/48 kHz rate and does not resample.
- These are Meta's general-purpose models. Anyone holding the weights and the LTX-2 code can run detection, and a determined adversary may be able to weaken or remove the mark.
## Provenance
- `pixelseal.pth` is Meta's public PixelSeal checkpoint ([facebookresearch/videoseal](https://github.com/facebookresearch/videoseal)), repacked to the `model` state dict only. The optimizer, discriminator, EMA, and scheduler state were dropped; the model tensors are unchanged.
- `pixelseal.yaml` is the PixelSeal card from `videoseal` commit [`870ca7f`](https://github.com/facebookresearch/videoseal/tree/870ca7fb33578b90f14c602016b6c2788096226e). `videoseal_attenuation.yaml` is the `jnd_1_1` entry of that repo's `configs/attenuation.yaml`, which the pip package does not ship.
- `audioseal_generator.pth` and `audioseal_detector.pth` are the unmodified 16-bit base models from [facebook/audioseal](https://huggingface.co/facebook/audioseal).
## License
All weights and configs are released by Meta Platforms, Inc. under the MIT License; see `LICENSE-videoseal` and `LICENSE-audioseal`. The LTX-2 code is licensed separately; see the [LTX-2 repository](https://github.com/Lightricks/LTX-2).
## Citation
```bibtex
@article{fernandez2024video,
title = {Video Seal: Open and Efficient Video Watermarking},
author = {Fernandez, Pierre and Elsahar, Hady and Yalniz, I. Zeki and Mourachko, Alexandre},
journal = {arXiv preprint arXiv:2412.09492},
year = {2024}
}
@inproceedings{sanroman2024proactive,
title = {Proactive Detection of Voice Cloning with Localized Watermarking},
author = {San Roman, Robin and Fernandez, Pierre and Elsahar, Hady and D{\'e}fossez, Alexandre and Furon, Teddy and Tran, Tuan},
booktitle = {International Conference on Machine Learning (ICML)},
year = {2024}
}
```
|