Spaces:
Running on Zero

File size: 1,617 Bytes
0aa3bab
38af57e
 
14a4c0b
 
0aa3bab
 
 
38af57e
14a4c0b
 
38af57e
 
 
 
 
 
0aa3bab
 
38af57e
14a4c0b
38af57e
 
14a4c0b
38af57e
 
 
 
 
 
14a4c0b
38af57e
 
14a4c0b
38af57e
 
 
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
---
title: DuoEdit
emoji: ✂️
colorFrom: yellow
colorTo: green
sdk: gradio
sdk_version: 6.33.0
app_file: app.py
short_description: Remove, insert or replace subjects in a video
python_version: "3.12"
startup_duration_timeout: 1h
models:
  - JiayiWuLeo/DuoEdit
  - alibaba-pai/Wan2.2-Fun-A14B-Control
  - Wan-AI/Wan2.2-I2V-A14B-Diffusers
  - facebook/sam2.1-hiera-large
  - ZhengPeng7/BiRefNet
---

# DuoEdit

Demo of [DuoEdit: A Unified Local Video Editing Model Learning Only Two Primitive Operators](https://huggingface.co/papers/2611.35509)
([model](https://huggingface.co/JiayiWuLeo/DuoEdit), [project page](https://jiayi-wu-leo.github.io/duoedit/)).

DuoEdit adds LoRA adapters and retrained input projections to
[Wan2.2-Fun-A14B-Control](https://huggingface.co/alibaba-pai/Wan2.2-Fun-A14B-Control). The official code repo isn't
public yet, so this Space reimplements the conditioning interface from the paper's appendix:
`[z_t ; E(box video) ; P(1 - erase mask) ; E(full source)]` as the 52-channel video input, plus
`[E(appearance canvas) ; E(identity canvas)]` as prepended reference tokens. Sampling uses flow-matching Euler
(shift 5), 25 steps, CFG 4.5, and switches experts at t = 900.

Erase masks come from SAM 2.1 video tracking of the box you draw. Reference cut-outs come from BiRefNet. Both
experts run in fp8 on ZeroGPU.

Example clips and images are from the CC0
[linoyts/repo-to-space-example-videos](https://huggingface.co/datasets/linoyts/repo-to-space-example-videos) and
[linoyts/repo-to-space-example-inputs](https://huggingface.co/datasets/linoyts/repo-to-space-example-inputs) datasets.