yycc commited on
Commit
0ba128c
·
verified ·
1 Parent(s): cb5fec7

docs: head-to-head vs Wan2.2-Animate, with clips

Browse files
.gitattributes CHANGED
@@ -54,3 +54,5 @@ examples/media/swap-wushu-animals.mp4 filter=lfs diff=lfs merge=lfs -text
54
  examples/media/swap-wushu-robots.mp4 filter=lfs diff=lfs merge=lfs -text
55
  examples/media/hero-corgi.mp4 filter=lfs diff=lfs merge=lfs -text
56
  examples/media/hero-duo.mp4 filter=lfs diff=lfs merge=lfs -text
 
 
 
54
  examples/media/swap-wushu-robots.mp4 filter=lfs diff=lfs merge=lfs -text
55
  examples/media/hero-corgi.mp4 filter=lfs diff=lfs merge=lfs -text
56
  examples/media/hero-duo.mp4 filter=lfs diff=lfs merge=lfs -text
57
+ examples/media/compare-cosplay.mp4 filter=lfs diff=lfs merge=lfs -text
58
+ examples/media/compare-gamechar.mp4 filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -11,30 +11,6 @@ tags:
11
  - video-to-video
12
  - distillation
13
  - dmd
14
- extra_gated_prompt: >-
15
- Viggle-Animate is a Model Derivative of MiniMax H3 and is distributed under the
16
- MiniMax H3 Community License Agreement, not an open-source license. Two terms in
17
- particular are easy to miss.
18
-
19
-
20
- **Territory.** The Agreement grants rights worldwide EXCEPT in the European Union,
21
- the United Kingdom, the Republic of Korea and the United States of America. In
22
- those Excluded Territories it grants you nothing, and Section V.4 forbids using,
23
- reproducing, modifying, distributing or displaying the Works or their Outputs
24
- there. If you are in an Excluded Territory, contact MiniMax at api@minimax.io for
25
- a separate license before downloading.
26
-
27
-
28
- **Acceptable use.** This model replaces the person in a video with whoever you paint
29
- into its first frame. Do not use it on anyone who has not consented, and read the
30
- Acceptable Use Policy in Exhibit A of the Agreement.
31
- extra_gated_fields:
32
- Name: text
33
- Organization: text
34
- Country: country
35
- I am not located in the EU, UK, South Korea or the USA, or I hold a separate license from MiniMax: checkbox
36
- I have read and agree to the MiniMax H3 Community License Agreement and its Acceptable Use Policy: checkbox
37
- I will not use this model on people who have not consented: checkbox
38
  ---
39
 
40
  # Viggle-Animate
@@ -47,8 +23,37 @@ extra_gated_fields:
47
 
48
  Left panel is the driving video, right panel is this model at `--steps 4`. The only other input
49
  is that same clip's own first frame with the character painted over — same camera, same pose,
50
- same background, same light. No pose skeletons, no segmentation masks, no background plates, no
51
- text prompt.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
  <div align="center">
54
  <div style="display:inline-block;text-align:left;border:1px solid rgba(128,128,128,.35);border-radius:10px;padding:16px 18px;margin:6px 0">
@@ -102,44 +107,28 @@ replacement recipe — 20 steps, `sample_shift 5.0`, `--refert_num 1 --replace_f
102
  | Parameters | 33.1 B | 17.3 B |
103
 
104
  **6.1× faster per render, 10.3× on sampling alone**, on a model with 1.9× the parameters. Wan's
105
- preprocessing pass is not counted in its 160 s. The win is step distillation, not a faster
106
- backbone: per forward pass we are 4.5 s to Wan's 3.5 s.
107
 
108
  Four panels each: **painted reference · driving video · this model · Wan2.2-Animate-14B.**
109
 
110
  <video controls muted loop playsinline width="100%" src="https://huggingface.co/Viggle/Viggle-Animate/resolve/main/examples/media/compare-prop.mp4"></video>
111
 
112
- A light-up toy held in both hands. Wan renders it as a featureless red blob, then as a blown-out
113
- white rectangle for the rest of the clip.
114
-
115
  <video controls muted loop playsinline width="100%" src="https://huggingface.co/Viggle/Viggle-Animate/resolve/main/examples/media/compare-costume.mp4"></video>
116
 
117
- A white bow headwrap, floral-print leggings and navy slippers, driven by a bearded man. Wan flattens
118
- the leggings to plain white, drops the bow and the slippers, and lets the driver's beard through.
119
 
120
- <video controls muted loop playsinline width="100%" src="https://huggingface.co/Viggle/Viggle-Animate/resolve/main/examples/media/compare-style.mp4"></video>
121
 
122
- A flat 2D anime character. Wan drifts toward a semi-realistic face and recolours the outfit.
123
-
124
- The two pipelines carry appearance very differently. In replacement mode Wan regenerates everything
125
- inside a per-frame mask over the driving performer, and what it has to rebuild that region from is
126
- one CLIP embedding plus one VAE latent of the character image, against a pose-skeleton video, 512×512
127
- face crops through a motion encoder, and a background plate with the region painted out — four of the
128
- five conditioning streams derived from the driving clip. At the documented `--w_len 1 --h_len 1` the
129
- painted-out region is the performer's whole bounding box, so a held prop sits inside it and is not
130
- represented in any of those streams. We condition on the painted frame and the driving video, with no
131
- pose extraction, no segmentation, no background plate and no prompt.
132
 
133
- These three are selected. Across the 24 clips we ran head to head, Wan came out ahead on one — a
134
- tight talking-head shot, where its explicit face channel tracks expression that we render flat. That
135
- is the same weakness listed under Limitations below. Roughly six were a wash.
136
 
137
  ## What you can paint in
138
 
139
  The model is never told what the new character is — it sees one edited frame and carries it through
140
  five seconds of motion it did not choreograph. So the question is how far from a person that
141
- character can get. Three panels each: **painted reference · driving video · this model.** All ten
142
- are single attempts at both stages: one paint, one render, `--steps 4 --seed 42`, no best-of-N.
143
 
144
  **Animals.** Ears, eye patches and flippers move on limbs the driving clip does not have — the paint
145
  places them, the render animates them as if they were arms and a head.
@@ -178,12 +167,10 @@ Two parts, both derived from [`MiniMaxAI/MiniMax-H3`](https://huggingface.co/Min
178
  | `transformer/` | 33.1 B, bf16, 14 shards. A **full finetune** of the base `transformer_ref` on a character-replacement objective |
179
  | `lora/` | rank 128 over 302 linear layers, 2.5 GB. A **DMD2-distilled** delta on that finetune — this is what turns 30 sampling steps into 4 |
180
 
181
- The LoRA is a delta on the *finetuned* transformer. Loading it onto stock `transformer_ref`
182
- produces garbage. There is no text prompt: conditioning is a frozen embedding computed once
183
- ([`assets/fixed_prompt.txt`](assets/fixed_prompt.txt)), so the text encoder never loads. All of
184
- the art direction happens in the frame you paint.
185
 
186
- ## Install
187
 
188
  This repository ships only the transformer and the LoRA — the VAE, audio VAE and schedulers load
189
  from your own copy of the base model. Inference touches 11 GB of its 269 GB:
@@ -196,6 +183,10 @@ hf download MiniMaxAI/MiniMax-H3 --local-dir ./MiniMax-H3 \
196
  hf download Viggle/Viggle-Animate --local-dir ./Viggle-Animate
197
 
198
  pip install torch "git+https://github.com/huggingface/diffusers@d6726f3" av
 
 
 
 
199
  ```
200
 
201
  `d6726f3` is the tested `diffusers` commit; the upstream `minimax_h3` modular pipeline is enough,
@@ -205,14 +196,6 @@ no fork or patch. The last `--include` is the clip [`examples/demo.sh`](examples
205
  124-frame render peaks at 80.1 GiB allocated. Use a card with ≥ 96 GB, or pass `--offload` to
206
  stream blocks from CPU (~12 GB resident, much slower).
207
 
208
- ## Run
209
-
210
- ```bash
211
- python Viggle-Animate/inference/sample.py \
212
- --model-dir ./MiniMax-H3 \
213
- --cond driving.mp4 --ref repainted_first_frame.png --out swapped.mp4
214
- ```
215
-
216
  Defaults are the evaluated configuration: `--steps 4 --flow-shift 3 --num-frames 124` (≈ 5.2 s at
217
  24 fps) `--seed 42`. Output geometry follows the driving clip and must be a multiple of 32 on both
218
  axes. Weights load in ~21 s, once per process.
@@ -234,18 +217,15 @@ in **40–60 s**. That quantization path is not shipped here.
234
  - **Everything you want must survive the paint step.** The model will not invent a costume detail,
235
  a prop or a face the reference does not show.
236
  - **More steps is not better.** `--steps 4` is the operating point, not a degraded `--steps 12`. It
237
- renders sharper than its own teacher Laplacian variance 16–50 % higher — which reads as detail
238
- sometimes and over-sharpening other times, and worsens with more steps.
239
- - **The reference defines only the views it contains.** A character painted from behind has no
240
- front, and when the driving clip rotates to reveal one the model fills it from its own prior
241
- rather than from your character. On a figure skater who spins to face camera, a swapped-in cat is
242
- a cat while her back is turned, a generic woman at the moment she faces us, and a cat again when
243
- she turns away. Prefer driving clips that keep one side to camera, or paint a frame that shows the
244
- view the clip will eventually reach.
245
- - **A silhouette far from the driver's survives as colour, not as geometry.** A LEGO minifigure on
246
- that same skating clip kept its palette and its yellow claw hands, but the moulded plastic body
247
- reverted to human anatomy. The airliner above works because the paint bound its wings to the arms
248
- — geometry the *driving pose* can still explain.
249
  - **No facial-landmark channel**, so tight close-up dialogue is the weakest case — Wan drives the
250
  face from explicit landmarks and is visibly more expressive there.
251
  - **Out of distribution is not the same as broken.** Training was one subject filling a portrait
@@ -257,13 +237,12 @@ in **40–60 s**. That quantization path is not shipped here.
257
 
258
  ## License
259
 
260
- - **Code** [`inference/`](inference) and [`examples/`](examples) are Apache 2.0
261
- ([`LICENSE-CODE`](LICENSE-CODE)).
262
- - **Weights** `transformer/` and `lora/` are Model Derivatives of MiniMax H3 and stay under the
263
- [MiniMax H3 Community License](LICENSE), which covers distillation explicitly. It is not an
264
- open-source license and grants **no rights in the EU, UK, South Korea or the USA**. Read it
265
- before redistributing or shipping a product. Our changes are in
266
- [`MODIFICATIONS.md`](MODIFICATIONS.md).
267
 
268
  ## Intended use
269
 
 
11
  - video-to-video
12
  - distillation
13
  - dmd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  ---
15
 
16
  # Viggle-Animate
 
23
 
24
  Left panel is the driving video, right panel is this model at `--steps 4`. The only other input
25
  is that same clip's own first frame with the character painted over — same camera, same pose,
26
+ same background, same light.
27
+
28
+ <div align="center">
29
+ <div style="display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin:20px 0 6px;text-align:left">
30
+
31
+ <div style="flex:1 1 170px;border:1px solid rgba(128,128,128,.35);border-radius:10px;padding:12px 14px">
32
+ <div style="font-size:1.7em;font-weight:700;line-height:1.15">26 s</div>
33
+ <b>per render</b><br>
34
+ <small style="opacity:.7">124 frames at 24 fps on one B200 · 4 sampling steps, 3 forward passes</small>
35
+ </div>
36
+
37
+ <div style="flex:1 1 170px;border:1px solid rgba(128,128,128,.35);border-radius:10px;padding:12px 14px">
38
+ <div style="font-size:1.7em;font-weight:700;line-height:1.15">2</div>
39
+ <b>inputs</b><br>
40
+ <small style="opacity:.7">a driving clip and its own first frame, repainted · no pose, mask, depth or prompt</small>
41
+ </div>
42
+
43
+ <div style="flex:1 1 170px;border:1px solid rgba(128,128,128,.35);border-radius:10px;padding:12px 14px">
44
+ <div style="font-size:1.7em;font-weight:700;line-height:1.15">anything</div>
45
+ <b>you can paint</b><br>
46
+ <small style="opacity:.7">animals, machines, flat 2D, two at once — the model is never told what it is</small>
47
+ </div>
48
+
49
+ <div style="flex:1 1 170px;border:1px solid rgba(128,128,128,.35);border-radius:10px;padding:12px 14px">
50
+ <div style="font-size:1.7em;font-weight:700;line-height:1.15">1</div>
51
+ <b>take each</b><br>
52
+ <small style="opacity:.7">every clip on this page is one paint, one render, <code>--steps 4 --seed 42</code> · no best-of-N</small>
53
+ </div>
54
+
55
+ </div>
56
+ </div>
57
 
58
  <div align="center">
59
  <div style="display:inline-block;text-align:left;border:1px solid rgba(128,128,128,.35);border-radius:10px;padding:16px 18px;margin:6px 0">
 
107
  | Parameters | 33.1 B | 17.3 B |
108
 
109
  **6.1× faster per render, 10.3× on sampling alone**, on a model with 1.9× the parameters. Wan's
110
+ preprocessing pass is not counted in its 160 s.
 
111
 
112
  Four panels each: **painted reference · driving video · this model · Wan2.2-Animate-14B.**
113
 
114
  <video controls muted loop playsinline width="100%" src="https://huggingface.co/Viggle/Viggle-Animate/resolve/main/examples/media/compare-prop.mp4"></video>
115
 
 
 
 
116
  <video controls muted loop playsinline width="100%" src="https://huggingface.co/Viggle/Viggle-Animate/resolve/main/examples/media/compare-costume.mp4"></video>
117
 
118
+ <video controls muted loop playsinline width="100%" src="https://huggingface.co/Viggle/Viggle-Animate/resolve/main/examples/media/compare-cosplay.mp4"></video>
 
119
 
120
+ <video controls muted loop playsinline width="100%" src="https://huggingface.co/Viggle/Viggle-Animate/resolve/main/examples/media/compare-gamechar.mp4"></video>
121
 
122
+ <video controls muted loop playsinline width="100%" src="https://huggingface.co/Viggle/Viggle-Animate/resolve/main/examples/media/compare-style.mp4"></video>
 
 
 
 
 
 
 
 
 
123
 
124
+ Five selected from 24 clips run head to head. Wan came out ahead on one — a tight talking-head shot,
125
+ where its explicit face channel tracks expression that we render flat; roughly six were a wash.
 
126
 
127
  ## What you can paint in
128
 
129
  The model is never told what the new character is — it sees one edited frame and carries it through
130
  five seconds of motion it did not choreograph. So the question is how far from a person that
131
+ character can get. Three panels each: **painted reference · driving video · this model.**
 
132
 
133
  **Animals.** Ears, eye patches and flippers move on limbs the driving clip does not have — the paint
134
  places them, the render animates them as if they were arms and a head.
 
167
  | `transformer/` | 33.1 B, bf16, 14 shards. A **full finetune** of the base `transformer_ref` on a character-replacement objective |
168
  | `lora/` | rank 128 over 302 linear layers, 2.5 GB. A **DMD2-distilled** delta on that finetune — this is what turns 30 sampling steps into 4 |
169
 
170
+ The LoRA is a delta on the *finetuned* transformer loading it onto stock `transformer_ref` produces
171
+ garbage. The frozen conditioning embedding is [`assets/fixed_prompt.txt`](assets/fixed_prompt.txt).
 
 
172
 
173
+ ## Quickstart
174
 
175
  This repository ships only the transformer and the LoRA — the VAE, audio VAE and schedulers load
176
  from your own copy of the base model. Inference touches 11 GB of its 269 GB:
 
183
  hf download Viggle/Viggle-Animate --local-dir ./Viggle-Animate
184
 
185
  pip install torch "git+https://github.com/huggingface/diffusers@d6726f3" av
186
+
187
+ python Viggle-Animate/inference/sample.py \
188
+ --model-dir ./MiniMax-H3 \
189
+ --cond driving.mp4 --ref repainted_first_frame.png --out swapped.mp4
190
  ```
191
 
192
  `d6726f3` is the tested `diffusers` commit; the upstream `minimax_h3` modular pipeline is enough,
 
196
  124-frame render peaks at 80.1 GiB allocated. Use a card with ≥ 96 GB, or pass `--offload` to
197
  stream blocks from CPU (~12 GB resident, much slower).
198
 
 
 
 
 
 
 
 
 
199
  Defaults are the evaluated configuration: `--steps 4 --flow-shift 3 --num-frames 124` (≈ 5.2 s at
200
  24 fps) `--seed 42`. Output geometry follows the driving clip and must be a multiple of 32 on both
201
  axes. Weights load in ~21 s, once per process.
 
217
  - **Everything you want must survive the paint step.** The model will not invent a costume detail,
218
  a prop or a face the reference does not show.
219
  - **More steps is not better.** `--steps 4` is the operating point, not a degraded `--steps 12`. It
220
+ renders sharper than its teacher (Laplacian variance 16–50 % higher) — detail sometimes,
221
+ over-sharpening other times, worse the further you push it.
222
+ - **The paint carries appearance; the driving video carries geometry.** Two consequences. A view the
223
+ reference never shows is filled from the model's prior: a cat painted from behind is a cat while
224
+ the skater's back is turned, a generic woman at the frame she faces camera, a cat again after. And
225
+ a silhouette the driving pose cannot explain survives as colour only a LEGO minifigure kept its
226
+ palette and yellow claw hands but reverted to human anatomy, while the airliner held because the
227
+ paint bound its wings to the arms. Prefer clips that keep one side to camera, and bind new limbs
228
+ to real ones.
 
 
 
229
  - **No facial-landmark channel**, so tight close-up dialogue is the weakest case — Wan drives the
230
  face from explicit landmarks and is visibly more expressive there.
231
  - **Out of distribution is not the same as broken.** Training was one subject filling a portrait
 
237
 
238
  ## License
239
 
240
+ The weights are a Model Derivative of MiniMax H3, so the
241
+ [MiniMax H3 Community License](LICENSE) applies to them — read it before you redistribute them or
242
+ ship a product on them. Our changes are listed in [`MODIFICATIONS.md`](MODIFICATIONS.md).
243
+
244
+ The code in [`inference/`](inference) and [`examples/`](examples) is Apache 2.0
245
+ ([`LICENSE-CODE`](LICENSE-CODE)).
 
246
 
247
  ## Intended use
248
 
examples/media/compare-cosplay.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6bd63ca750de511cbc6391664def22a9671f79d6885729c8d20bc92978fc8843
3
+ size 1099913
examples/media/compare-gamechar.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:69e34a0ec75f588dfa3c2cdf882fab5bb7107e357e64ceb0d1881d8dbc23452c
3
+ size 858158