--- 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).