infosave commited on
Commit
0914add
Β·
verified Β·
1 Parent(s): 79fdefb

README: one 'Making it smaller' section, a Which-file table keyed on VRAM, three-way sample comparison

Browse files
Files changed (1) hide show
  1. README.md +47 -25
README.md CHANGED
@@ -14,7 +14,7 @@ tags:
14
  - 4-bit
15
  ---
16
 
17
- # MiniMax-H3 Turbo β€” one 23.5 GB file, no Python
18
 
19
  [MiniMax-H3](https://huggingface.co/Comfy-Org/MiniMax-H3) renders video and
20
  synchronized stereo audio from one prompt, in one transformer, on two flow
@@ -31,9 +31,11 @@ underneath.
31
  | prompt encoder | 51.5 GB (bf16) | β€” |
32
  | video + audio VAE | 5.8 GB | β€” |
33
  | Turbo LoRA | 0.8 GB | β€” |
34
- | **total** | **124.4 GB, four files + a ComfyUI checkout** | **23.5 GB, one file** |
35
 
36
- 47.83 B parameters, 2 361 tensors, `cortiq verify` clean.
 
 
37
 
38
  ## What comes out
39
 
@@ -59,12 +61,19 @@ give it a first and/or last frame and it continues from there. The release's
59
  third path β€” `ref2va`, conditioning on reference images, clips and audio β€” is
60
  not ported.
61
 
62
- | file | size | |
63
- |---|---|---|
64
- | `mmh3-turbo-fl2va-q4tp.cmf` | 23.94 GB | **use this one** β€” text-to-video AND keyframe-to-video |
65
- | `mmh3-turbo-q4tp.cmf` | 23.47 GB | the same without the vision tower: text-to-video only |
66
- | `mmh3-turbo-clipproj4b-q4tp.cmf` | **13.16 GB** | text-to-video with a 4B stand-in prompt encoder. Peaks at 15.1 GB of VRAM, so a 20 GB card holds the whole run instead of paging it; still four bits everywhere. Costs some set dressing β€” see below |
67
- | `mmh3-turbo-fl2va-q2tp.cmf` | 18.74 GB | two bits on the gate/up planes. Smaller, faster, and it stops following the prompt β€” kept for anyone who wants to push on it, not for rendering. See below |
 
 
 
 
 
 
 
68
 
69
  ## Keyframe to video
70
 
@@ -112,7 +121,9 @@ cortiq --version
112
 
113
  ### 2. Get the weights
114
 
115
- One file, 23.5 GB.
 
 
116
 
117
  ```bash
118
  pip install -U "huggingface_hub[cli]" # only to fetch the file
@@ -201,7 +212,22 @@ peaks at 15.1 GB of VRAM β€” a whole-run maximum, polled, not a snapshot. That i
201
  what makes it the one to reach for on a 20 GB card: below that the prompt
202
  encoder pages, and on this workload paging costs more than any kernel.
203
 
204
- ## Two bits: smaller, faster, and answering a different question
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
205
 
206
  The obvious next cut is the DeepSeek-V4 policy: gate/up at two bits,
207
  everything else at four. It builds β€” 23.94 GB down to **18.74**, and
@@ -237,7 +263,7 @@ measuring next β€” the packer's policy is one predicate,
237
  that experiment starts from something rather than nothing; four bits is
238
  what to render with.
239
 
240
- ## A smaller encoder instead of fewer bits
241
 
242
  The two-bit section above ends on a diagnosis: half this file is the PROMPT
243
  ENCODER, and squeezing it is what broke the prompt. There is a second way to act
@@ -259,7 +285,7 @@ both VAE decoders, still `q4tp`. Nothing anywhere is two bits.
259
 
260
  **23.47 GB β†’ 13.16 GB.** The encoder went from 552 tensors to 277.
261
 
262
- ### Does it still mean the same thing?
263
 
264
  That is measurable without rendering a frame: dump what the DiT actually
265
  receives (`CMF_TE_DUMP=<path>`) from both files on one prompt, and take the
@@ -278,7 +304,7 @@ attention sink is an outlier no regression fits β€” and it lands at cosine
278
  **0.9999** against the teacher's, which is the sharpest single confirmation
279
  that the mechanism is wired right.
280
 
281
- ### What it costs
282
 
283
  The one number that transfers between machines is the **encode stage**, because
284
  that is the only stage ClipProj replaced. Same prompt, seed and four steps,
@@ -305,15 +331,10 @@ there is nothing left to page.
305
  The parity probe takes the device arm on both files at the same `rel rms
306
  4.65e-3`, which is its own small proof that the DiT came through untouched.
307
 
308
- ### What it costs in quality
309
 
310
- Judge it on the clip, not on a frame: a still catches the pancake at rest and
311
- reads as a loss that is not there.
312
-
313
- | four bits, 32B encoder | four bits, 4B + ClipProj | two bits, 32B encoder |
314
- |---|---|---|
315
- | ![32B](https://huggingface.co/infosave/MiniMax-H3-Turbo-cmf/resolve/main/samples/ab_q4tp.gif) | ![ClipProj](https://huggingface.co/infosave/MiniMax-H3-Turbo-cmf/resolve/main/samples/ab_clipproj.gif) | ![two bits](https://huggingface.co/infosave/MiniMax-H3-Turbo-cmf/resolve/main/samples/ab_q2tp.gif) |
316
- | 23.94 GB | **13.16 GB** | 18.74 GB |
317
 
318
  Across the 39 frames the 4B does the whole job: corgi, chef hat, flat clean
319
  style, and the pancake **leaves the surface and comes back**, the dish empty
@@ -334,7 +355,7 @@ the two-bit build it is a trade rather than a loss.
334
  Sound is untouched either way: the audio branch never sees the prompt encoder.
335
  [The clip with its audio.](https://huggingface.co/infosave/MiniMax-H3-Turbo-cmf/resolve/main/samples/ab_clipproj.mp4)
336
 
337
- ### Building one
338
 
339
  ```bash
340
  cortiq animate-pack \
@@ -399,8 +420,9 @@ dequantizes to f32, so the two renders differ by a few per cent in latent rms
399
  and visibly in fine texture. Set `CMF_SDOT=0` on both sides to compare
400
  arithmetic instead of that approximation.
401
 
402
- **Why the device is opt-in.** Getting it right took three fixes, and one
403
- thing is still held back.
 
404
 
405
  The engine's blocked f32 GEMM cached its weight-side device buffer **by
406
  pointer address**. Every batched attention allocates one k/v scratch pair per
 
14
  - 4-bit
15
  ---
16
 
17
+ # MiniMax-H3 Turbo β€” one file, no Python
18
 
19
  [MiniMax-H3](https://huggingface.co/Comfy-Org/MiniMax-H3) renders video and
20
  synchronized stereo audio from one prompt, in one transformer, on two flow
 
31
  | prompt encoder | 51.5 GB (bf16) | β€” |
32
  | video + audio VAE | 5.8 GB | β€” |
33
  | Turbo LoRA | 0.8 GB | β€” |
34
+ | **total** | **124.4 GB, four files + a ComfyUI checkout** | **13.2–23.9 GB, one file** |
35
 
36
+ 47.83 B parameters, 2 361 tensors, `cortiq verify` clean. The 13.2 GB end of
37
+ that range swaps the prompt encoder for a 4B stand-in and fits a 20 GB card
38
+ whole β€” [see below](#making-it-smaller).
39
 
40
  ## What comes out
41
 
 
61
  third path β€” `ref2va`, conditioning on reference images, clips and audio β€” is
62
  not ported.
63
 
64
+ ### Which file
65
+
66
+ Start from how much VRAM you have; that decides more than anything else here.
67
+
68
+ | file | size | keyframes | take it when |
69
+ |---|---|---|---|
70
+ | `mmh3-turbo-fl2va-q4tp.cmf` | 23.94 GB | yes | **the default.** 24 GB of VRAM or more, or you are happy to page |
71
+ | `mmh3-turbo-q4tp.cmf` | 23.47 GB | no | same weights without the vision tower, if you only ever type prompts |
72
+ | **`mmh3-turbo-clipproj4b-q4tp.cmf`** | **13.16 GB** | no | **16–20 GB of VRAM.** A 4B stand-in prompt encoder; peaks at 15.1 GB, so the run stays resident instead of paging. Still four bits everywhere |
73
+ | `mmh3-turbo-fl2va-q2tp.cmf` | 18.74 GB | yes | **don't render with this.** Two bits stopped it following the prompt; kept as a starting point for anyone pushing on it |
74
+
75
+ Both smaller files are explained under [Making it smaller](#making-it-smaller),
76
+ with the same prompt rendered through each.
77
 
78
  ## Keyframe to video
79
 
 
121
 
122
  ### 2. Get the weights
123
 
124
+ One file. Pick it from [Which file](#which-file) above β€” this is the
125
+ text-to-video default; swap the name for `mmh3-turbo-clipproj4b-q4tp.cmf` if
126
+ you are on a 20 GB card.
127
 
128
  ```bash
129
  pip install -U "huggingface_hub[cli]" # only to fetch the file
 
212
  what makes it the one to reach for on a 20 GB card: below that the prompt
213
  encoder pages, and on this workload paging costs more than any kernel.
214
 
215
+ ## Making it smaller
216
+
217
+ Half this file is the PROMPT ENCODER β€” 12.2 GB of Qwen3-VL against the DiT that
218
+ actually draws. Two ways to act on that were tried. **Squeezing it does not
219
+ work; replacing it does.** Same prompt, same seed, same four steps through all
220
+ three:
221
+
222
+ | four bits, 32B encoder | four bits, 4B + ClipProj | two bits, 32B encoder |
223
+ |---|---|---|
224
+ | ![32B](https://huggingface.co/infosave/MiniMax-H3-Turbo-cmf/resolve/main/samples/ab_q4tp.gif) | ![ClipProj](https://huggingface.co/infosave/MiniMax-H3-Turbo-cmf/resolve/main/samples/ab_clipproj.gif) | ![two bits](https://huggingface.co/infosave/MiniMax-H3-Turbo-cmf/resolve/main/samples/ab_q2tp.gif) |
225
+ | 23.94 GB β€” the reference | **13.16 GB β€” still the right clip** | 18.74 GB β€” a different clip |
226
+
227
+ Left and centre are the same scene with different furniture. Right is a
228
+ different animal with no pan and no pancake. The two sections below are why.
229
+
230
+ ### Two bits: smaller, faster, and answering a different question
231
 
232
  The obvious next cut is the DeepSeek-V4 policy: gate/up at two bits,
233
  everything else at four. It builds β€” 23.94 GB down to **18.74**, and
 
263
  that experiment starts from something rather than nothing; four bits is
264
  what to render with.
265
 
266
+ ### A smaller encoder: replace it, don't squeeze it
267
 
268
  The two-bit section above ends on a diagnosis: half this file is the PROMPT
269
  ENCODER, and squeezing it is what broke the prompt. There is a second way to act
 
285
 
286
  **23.47 GB β†’ 13.16 GB.** The encoder went from 552 tensors to 277.
287
 
288
+ #### Does it still mean the same thing?
289
 
290
  That is measurable without rendering a frame: dump what the DiT actually
291
  receives (`CMF_TE_DUMP=<path>`) from both files on one prompt, and take the
 
304
  **0.9999** against the teacher's, which is the sharpest single confirmation
305
  that the mechanism is wired right.
306
 
307
+ #### What it buys
308
 
309
  The one number that transfers between machines is the **encode stage**, because
310
  that is the only stage ClipProj replaced. Same prompt, seed and four steps,
 
331
  The parity probe takes the device arm on both files at the same `rel rms
332
  4.65e-3`, which is its own small proof that the DiT came through untouched.
333
 
334
+ #### What it costs in quality
335
 
336
+ Judge it on the clip at the top of this section, not on a frame: a still
337
+ catches the pancake at rest and reads as a loss that is not there.
 
 
 
 
 
338
 
339
  Across the 39 frames the 4B does the whole job: corgi, chef hat, flat clean
340
  style, and the pancake **leaves the surface and comes back**, the dish empty
 
355
  Sound is untouched either way: the audio branch never sees the prompt encoder.
356
  [The clip with its audio.](https://huggingface.co/infosave/MiniMax-H3-Turbo-cmf/resolve/main/samples/ab_clipproj.mp4)
357
 
358
+ #### Building one
359
 
360
  ```bash
361
  cortiq animate-pack \
 
420
  and visibly in fine texture. Set `CMF_SDOT=0` on both sides to compare
421
  arithmetic instead of that approximation.
422
 
423
+ **Why the device took a while to trust.** It is no longer opt-in β€” the parity
424
+ probe decides per file β€” but getting there took three fixes, and one thing is
425
+ still held back.
426
 
427
  The engine's blocked f32 GEMM cached its weight-side device buffer **by
428
  pointer address**. Every batched attention allocates one k/v scratch pair per