File size: 1,587 Bytes
02052ca
d2c5d46
 
 
 
02052ca
 
 
d2c5d46
 
 
02052ca
 
d2c5d46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fe34df7
 
d2c5d46
 
 
 
 
 
 
 
 
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
---
title: DiffCVE
emoji: 🎬
colorFrom: red
colorTo: yellow
sdk: gradio
sdk_version: 6.32.0
app_file: app.py
python_version: "3.12"
short_description: Diffusion-based compressed video enhancement
startup_duration_timeout: 1h
---

# DiffCVE: Diffusion-based Compressed Video Enhancement

Interactive demo of **DiffCVE** ([paper](https://huggingface.co/papers/2607.07195)
· [code](https://github.com/wqmaker/DiffCVE) ·
[model](https://huggingface.co/wqmaker/DiffCVE)) — a diffusion-based restoration
model for H.264-compressed video.

Upload a clip, choose an H.264 **quantization parameter (QP)**, and the demo:

1. compresses your video with the paper's own fixed-QP JM (H.264) encoder,
2. extracts the coding priors the bitstream carries — per-pixel **motion
   vectors** (quarter-luma-pixel units) and luma **prediction residuals**,
3. restores the clip with the single-step distilled diffusion model,
   conditioned on those priors, the VAE-encoded structure, and a
   QP-conditioned degradation prompt (CDSP),
4. decodes with the **coding-prior-weighted fusion** (CPWF) VAE decoder.

Everything runs on ZeroGPU; frames are capped (≤10) and large videos are
downscaled (≤720 px) so a run finishes in about a minute and a half.

## Notes

- The bundled `codec/encoder` / `codec/decoder` binaries are the authors'
  modified JM (ITU/ISO) reference codec builds; copyright notices are included
  in `codec/COPYRIGHT_*.txt`.
- Example clips are from
  [`linoyts/repo-to-space-example-videos`](https://huggingface.co/datasets/linoyts/repo-to-space-example-videos)
  (CC0-1.0).