File size: 2,883 Bytes
19dea1e b1a5003 19dea1e b1a5003 1f081e2 19dea1e b1a5003 19dea1e b1a5003 2cab9c3 b1a5003 2cab9c3 b1a5003 2cab9c3 b1a5003 2cab9c3 b1a5003 2cab9c3 b1a5003 2cab9c3 b859009 2cab9c3 b859009 2cab9c3 b859009 b1a5003 2cab9c3 | 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 | ---
title: Video Watermark Remover
emoji: π¦
colorFrom: green
colorTo: blue
sdk: gradio
sdk_version: "4.44.0"
python_version: "3.10"
app_file: app.py
pinned: false
license: apache-2.0
---
# Video Watermark Remover
Self-hosted Hugging Face Space for removing static, opaque watermarks from video footage.
## Modes
| Mode | Model | Speed | Best for |
|------|-------|-------|----------|
| **Fast** | LaMa (per-frame) | Seconds | Sky, water, foliage β low-frequency backgrounds |
| **Quality** | Wan2.1-VACE-14B + lightx2v 4-step distill, FP8 on H200 | ~2-3 min | Structured or textured backgrounds |
## How it works
1. Upload a video clip β up to 60 s; the first 15 s is processed at 1080p
2. Paint over the watermark on the first frame using the brush, or:
- **Snap to Rectangle** β scribble roughly, click to convert to a clean filled rectangle
- **Clear Mask** β start the drawing over
3. Choose **Fast** or **Quality** mode
4. Hit **Remove Watermark** β output is composited back at the source resolution
### Crop-inpaint-composite
The pipeline never runs the model on the full 1920Γ1080 frame:
- The mask determines a tight crop, expanded to a model-friendly resolution with surrounding context
- Only that crop (~7Γ fewer pixels) is processed
- The result is feather-blended back into the original frame
- All other pixels are **byte-identical** to the source
V-Log / HDR colour metadata is preserved via FFmpeg flag passthrough (10-bit H.265 output for HDR sources).
## Platform
- ZeroGPU (Nvidia H200 MIG slice)
- PyTorch + diffusers β₯0.34
- ffmpeg via `packages.txt`
## Upstream protection
All model files come from a private mirror at [JackIsNotInTheBox/Video_Watermark_Remover_Checkpoints](https://huggingface.co/JackIsNotInTheBox/Video_Watermark_Remover_Checkpoints):
- LaMa: `lama/big-lama.pt` β `LAMA_MODEL_URL` defaults to the mirror, prefetched into `torch.hub` cache before `simple_lama_inpainting` can reach for its hardcoded GitHub release URL
- VACE-14B: `vace-14b/` β full diffusers package, loaded with `local_files_only=True` so any cache miss errors loudly instead of silently fetching from upstream HF Hub
- Distill LoRA: `loras/wan2.1_t2v_14b_lora_rank64_lightx2v_4step.safetensors` β same `local_files_only=True` enforcement
The Space stays functional even if upstream Wan-AI / lightx2v / GitHub release sources are deleted: at runtime nothing reaches for them.
On the first deploy, ~75 GB of VACE weights are downloaded from the mirror to the persistent cache in a background thread. Fast mode works immediately; Quality mode blocks until prewarm finishes (the UI shows a progress message during the wait).
## License
- Pipeline code: Apache 2.0
- LaMa: Apache 2.0
- Wan2.1-VACE-14B: Apache 2.0 ([Wan-AI repo](https://huggingface.co/Wan-AI/Wan2.1-VACE-14B-diffusers))
- lightx2v 4-step distill LoRA: Apache 2.0
|