larryvrh commited on
Commit
e0d2a1d
·
verified ·
1 Parent(s): 7162009

README: overhaul — v4-600 EMA is the current recommended checkpoint

Browse files
Files changed (1) hide show
  1. README.md +87 -75
README.md CHANGED
@@ -11,117 +11,129 @@ tags:
11
  pipeline_tag: text-to-video
12
  ---
13
 
14
- # MiniMax-H3 Turbo LoRA — 4-step audio-video generation (preview)
15
 
16
  A LoRA for [MiniMax-H3](https://huggingface.co/Comfy-Org/MiniMax-H3) that renders
17
- joint **video + synchronized stereo audio** in **4 sampling steps** instead of
18
- the usual ~20 — roughly a 5× speedup in sampling wall-clock.
19
-
20
- > ⚠️ **Preview — sharp, but with known artifacts.** The current weights
21
- > (`ckpt850`) are the **final checkpoint of this training round**. Detail and
22
- > sharpness at 4 steps are now high — a large step up from earlier checkpoints —
23
- > but serious issues are surfacing at this point: **plastic-looking skin and
24
- > over-sharp grain/noise**. Training of this round is **paused while we address
25
- > them**, so treat these as a sharp-but-imperfect preview, not a finished model.
26
- > The ComfyUI nodes are also prototype code: **functionality and compatibility
27
- > are not guaranteed.** **If something breaks, please open an issue** on the
28
- > [node repo](https://github.com/Larryvrh/ComfyUI-MiniMax-H3-Turbo/issues).
29
 
30
- ## Use it in ComfyUI (recommended)
31
 
32
- Custom nodes: **[Larryvrh/ComfyUI-MiniMax-H3-Turbo](https://github.com/Larryvrh/ComfyUI-MiniMax-H3-Turbo)**
33
- — or search **"MiniMax-H3 Turbo"** in ComfyUI-Manager.
 
 
 
 
 
 
 
 
 
 
 
34
 
35
- > 🔄 **Keep the node updated** — it's actively evolving and features land in new
36
- > versions (e.g. pruned-base support arrived after the first release). Update via
37
- > ComfyUI-Manager or `git pull`.
38
 
39
- 1. Install the nodes (Manager, or `git clone` into `ComfyUI/custom_nodes`).
40
- 2. Download a `.safetensors` from this repo into `ComfyUI/models/loras/`.
41
- 3. Start from the official [MiniMax-H3 workflow](https://docs.comfy.org/tutorials/video/minimax/minimax-h3)
42
- (text-to-video or image-to-video) and make two changes:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  - insert **MiniMax-H3 Turbo LoRA** between the model loader and the sampler;
44
- - replace the sampler feeding `SamplerCustomAdvanced` with **MiniMax-H3 Turbo
45
- Sampler (4-step)**, and set the scheduler to **4 steps** (`simple`).
46
 
47
- Everything else stays as in the official workflow, so both t2v and i2v work. A
48
- ready-made t2v workflow is included here (`minimax_h3_t2v_turbo.json`) and in the
49
  [node repo](https://github.com/Larryvrh/ComfyUI-MiniMax-H3-Turbo/tree/main/example_workflows)
50
- — drag it into ComfyUI. The custom sampler **auto-adapts to your ComfyUI version**:
51
- MiniMax-H3 runs video and audio on two different flow schedules; recent ComfyUI
52
- handles that natively (`ModelSamplingAV`), so on those builds the Turbo Sampler
53
- steps as a plain single-schedule sampler (and a stock `euler` works too), while on
54
- older ComfyUI it steps each stream on its own clock so the audio doesn't break at
55
- 4 steps. Keep it in the workflow and it does the right thing either way.
56
-
57
- - **Steps**: with `ckpt850`, **4 steps is already sharp** (earlier checkpoints
58
- needed 6–8 to firm up). Any count **≥ 4** is valid; more steps still help a
59
- little. Keep the scheduler on `simple`.
60
- - **LoRA strength** (default `1.0`) is the dial for the sharpness/artifact
61
- trade-off: if the result shows **blurry ghosting / smear**, nudge strength
62
- **up** (e.g. `1.05–1.2`); if it shows **over-sharp grain / artifacts**, nudge
63
- it **down** (e.g. `0.8–0.95`).
64
- - **Base model**: works with any MiniMax-H3 base — full (`bf16`, `int8_convrot`)
65
- **and the pruned/curve variants** (`pruned_int8`, `pruned_fp8`); the ComfyUI
66
- node auto-detects a pruned base and re-injects the time-conditioning at run
67
- time, so one LoRA covers every base.
68
- - **`low_vram`** (node switch): off by default (applies the LoRA at run time —
69
- sharpest, some extra peak VRAM). Turn it **on** if you run out of memory: it
70
- merges the LoRA into the weights for the lowest peak VRAM, at the cost of a
71
- **softer result on quantized (`int8` / `fp8` / pruned) bases**. Lowering the
72
- resolution or frame count also helps.
73
 
74
  ## Weights
75
 
76
- All bf16, ~744 MB, applied as a standard low-rank update
77
- (`W_eff = W + lora_B @ lora_A`, alpha = rank so no extra scaling):
 
78
 
79
- | file | ~step | notes |
80
- |---|---|---|
81
- | `minimax_h3_turbo_4step_ema_ckpt850.safetensors` | ~850 | **recommended — current final checkpoint** (time-averaged EMA, sharp at 4 steps) |
82
- | `minimax_h3_turbo_4step_ckpt850.safetensors` | ~850 | ckpt850 non-EMA — even sharper but over-sharpened; for comparison/analysis |
83
- | `minimax_h3_turbo_4step_ckpt500.safetensors` | ~500 | older, non-EMA (softer) |
84
- | `minimax_h3_turbo_4step_ema_ckpt500.safetensors` | ~500 | older EMA |
85
- | `minimax_h3_turbo_4step.safetensors` | ~200 | initial release, non-EMA |
86
- | `minimax_h3_turbo_4step_ema.safetensors` | ~200 | initial release, EMA (superseded) |
87
 
88
- `ckpt850` is the final checkpoint of this training round (paused — see the note
89
- at the top). Prefer the EMA file for the cleanest result.
 
90
 
91
  ## Standalone (no ComfyUI graph)
92
 
93
- `generate.py` is a single self-contained file — loads the base DiT + a LoRA,
94
- encodes the prompt, runs the 4-step dual-schedule sampler, decodes and muxes an
95
  mp4. It still needs a ComfyUI checkout for the H3 model / VAE / text-encoder
96
  definitions:
97
 
98
  ```bash
99
- # ComfyUI (pinned to the commit these weights were validated against)
100
  git clone https://github.com/comfyanonymous/ComfyUI
101
- cd ComfyUI && git checkout 14b05228cef127ce529bc0c08660770d4af3e9a8
102
- pip install -r requirements.txt && cd ..
103
- pip install -r requirements.txt # this repo: torch, safetensors, imageio-ffmpeg
104
 
105
  # base weights from Comfy-Org/MiniMax-H3 into a models/ tree, then:
106
  python generate.py \
107
  --comfyui ./ComfyUI \
108
  --base models/diffusion_models/minimax_h3_fl2va_bf16.safetensors \
109
- --lora minimax_h3_turbo_4step_ema_ckpt850.safetensors \
110
  --te models/text_encoders/qwen3vl_32b_minimax_h3_int8_convrot.safetensors \
111
  --video-vae models/vae/minimax_h3_video_vae_fp16.safetensors \
112
  --audio-vae models/vae/minimax_h3_audio_vae_fp32.safetensors \
113
  --prompt "A corgi in a chef hat flipping a pancake, sizzling sounds and a cheerful bark." \
114
- --width 1344 --height 768 --frames 124 --out corgi.mp4
115
  ```
116
 
117
  ## Notes
118
 
119
- - **Resolution / duration**: width/height are multiples of 32; the short edge is
120
- typically 768. Frame count is at 24 fps and snaps to the model's 17·k+5 grid
121
  (124 ≈ 5 s). Validated range ~124–362 frames (~5–15 s).
122
  - **VRAM**: the base model is large (~33 B); an 80 GB GPU is comfortable at the
123
- largest resolutions. The ComfyUI node streams the base and adds a `low_vram`
124
- switch (see above), so it runs on much smaller GPUs. In the standalone script,
125
  `--offload-adaln` trades ~13 GB of VRAM for CPU RAM.
126
  - **Audio**: 32 kHz stereo, aligned to the video; the two streams ride different
127
- flow schedules and are integrated each on its own clock.
 
 
11
  pipeline_tag: text-to-video
12
  ---
13
 
14
+ # MiniMax-H3 Turbo LoRA — few-step audio-video generation
15
 
16
  A LoRA for [MiniMax-H3](https://huggingface.co/Comfy-Org/MiniMax-H3) that renders
17
+ joint **video + synchronized stereo audio** in as few as **4 sampling steps**
18
+ instead of the usual ~20 — a ~5× sampling speedup — and keeps getting better as
19
+ you add steps.
 
 
 
 
 
 
 
 
 
20
 
21
+ ## Current best — `v4` at step 600 (EMA)
22
 
23
+ **Download `minimax_h3_turbo_v4_step600_ema.safetensors`.** It's the strongest
24
+ checkpoint we've released:
25
+
26
+ - **Static and small-motion shots** are much improved — clean, stable, natural.
27
+ - **Micro-detail** (faces, fingers, fine texture) is markedly better.
28
+ - The **over-sharpening / plastic look** of the earlier `v1` (~850) line is
29
+ **fully resolved**.
30
+
31
+ Two things still fall short of where we want them, and are what we're working on
32
+ next:
33
+
34
+ - **audio** quality and consistency;
35
+ - **behaviour under fast, intense motion**.
36
 
37
+ Everything else is in good shape. It's still a preview — training is ongoing — but
38
+ a considerably stronger one than the earlier rounds.
 
39
 
40
+ ## Steps and strength — read this
41
+
42
+ - **4 steps is the recommended *minimum*; 4–8 is the useful range.** 6–8 steps
43
+ look noticeably better than 4, so add steps if you can afford them. Past **8
44
+ steps** it stops helping and can start to introduce **over-sharp artifacts** —
45
+ there's no benefit to going higher, so stay in **4–8**.
46
+ - **Keep strength at `1.0`.** It's tuned for 1.0 and holds up well across the 4–8
47
+ step range. Only reach for the strength dial if a *specific* clip misbehaves —
48
+ then **blurry ghosting / smear → nudge up** (`~1.05–1.2`), **over-sharp grain →
49
+ nudge down** (`~0.8–0.95`).
50
+ - Keep the scheduler on `simple`.
51
+
52
+ ## Use it in ComfyUI (recommended)
53
+
54
+ Custom nodes: **[Larryvrh/ComfyUI-MiniMax-H3-Turbo](https://github.com/Larryvrh/ComfyUI-MiniMax-H3-Turbo)**
55
+ — or search **"MiniMax-H3 Turbo"** in ComfyUI-Manager. (Keep the node updated; it
56
+ evolves alongside these weights.)
57
+
58
+ 1. Install the nodes (Manager, or `git clone` into `ComfyUI/custom_nodes`) and put
59
+ a `.safetensors` from this repo into `ComfyUI/models/loras/`. You also need the
60
+ base MiniMax-H3 model, VAEs and text encoder — see the
61
+ [MiniMax-H3 tutorial](https://docs.comfy.org/tutorials/video/minimax/minimax-h3).
62
+ 2. Start from the official MiniMax-H3 workflow (t2v or i2v) and make two changes:
63
  - insert **MiniMax-H3 Turbo LoRA** between the model loader and the sampler;
64
+ - feed `SamplerCustomAdvanced` from **MiniMax-H3 Turbo Sampler**, and set the
65
+ scheduler to `simple` at **≥ 4 steps**.
66
 
67
+ Everything else stays as in the official graph, so both text-to-video and
68
+ image-to-video work. A ready-made t2v workflow ships in the
69
  [node repo](https://github.com/Larryvrh/ComfyUI-MiniMax-H3-Turbo/tree/main/example_workflows)
70
+ (and here as `minimax_h3_t2v_turbo.json`) — drag it in.
71
+
72
+ - **Base model**: any MiniMax-H3 base — full (`bf16`, `int8_convrot`) **and the
73
+ pruned/curve variants** (`pruned_int8`, `pruned_fp8`). The node auto-detects a
74
+ pruned base and re-injects the time-conditioning at run time, so **one LoRA file
75
+ covers every base**.
76
+ - **`low_vram`** switch: **off** applies the LoRA at run time (sharpest,
77
+ recommended); **on** merges it into the weights for the lowest peak VRAM (a bit
78
+ softer on quantized bases). Turn it on only if you run out of memory.
79
+ - The custom sampler **auto-adapts to your ComfyUI version**: MiniMax-H3 runs
80
+ video and audio on two different flow schedules; recent ComfyUI handles that
81
+ natively (`ModelSamplingAV`) and older ComfyUI doesn't — the Turbo Sampler
82
+ detects which and does the right thing either way, so nothing to change when you
83
+ update ComfyUI.
 
 
 
 
 
 
 
 
 
84
 
85
  ## Weights
86
 
87
+ All bf16, ~744 MB, applied as a plain low-rank update
88
+ (`W_eff = W + lora_B @ lora_A`, alpha = rank, so no extra scaling). **Prefer the
89
+ EMA files**; the non-EMA ones are for comparison.
90
 
91
+ | file | notes |
92
+ |---|---|
93
+ | **`minimax_h3_turbo_v4_step600_ema.safetensors`** | **recommended — current best.** Strong static/small-motion, good micro-detail, no over-sharpening. |
94
+ | `minimax_h3_turbo_v4_step600.safetensors` | v4-600 non-EMA (comparison). |
95
+ | `minimax_h3_turbo_v4_step150_ema.safetensors` | earlier v4 checkpoint. |
96
+ | `minimax_h3_turbo_4step_ema_ckpt850.safetensors` | `v1` line (~850) — sharp but over-sharpened / plastic; **superseded by v4**. |
97
+ | `minimax_h3_turbo_4step_ema_ckpt500.safetensors` | older `v1` (~500), softer. |
98
+ | `minimax_h3_turbo_4step_ema.safetensors` | initial release (~200). |
99
 
100
+ *Naming:* `v4` is the current training recipe and `stepN` is the training step.
101
+ Older files carry the previous `4step_ckptN` naming, where `4step` referred to the
102
+ sampler-step count.
103
 
104
  ## Standalone (no ComfyUI graph)
105
 
106
+ `generate.py` is a single self-contained file — it loads the base DiT + a LoRA,
107
+ encodes the prompt, runs the few-step dual-schedule sampler, decodes and muxes an
108
  mp4. It still needs a ComfyUI checkout for the H3 model / VAE / text-encoder
109
  definitions:
110
 
111
  ```bash
 
112
  git clone https://github.com/comfyanonymous/ComfyUI
113
+ cd ComfyUI && pip install -r requirements.txt && cd ..
114
+ pip install -r requirements.txt # this repo: torch, safetensors, imageio-ffmpeg
 
115
 
116
  # base weights from Comfy-Org/MiniMax-H3 into a models/ tree, then:
117
  python generate.py \
118
  --comfyui ./ComfyUI \
119
  --base models/diffusion_models/minimax_h3_fl2va_bf16.safetensors \
120
+ --lora minimax_h3_turbo_v4_step600_ema.safetensors \
121
  --te models/text_encoders/qwen3vl_32b_minimax_h3_int8_convrot.safetensors \
122
  --video-vae models/vae/minimax_h3_video_vae_fp16.safetensors \
123
  --audio-vae models/vae/minimax_h3_audio_vae_fp32.safetensors \
124
  --prompt "A corgi in a chef hat flipping a pancake, sizzling sounds and a cheerful bark." \
125
+ --width 1344 --height 768 --frames 124 --steps 6 --out corgi.mp4
126
  ```
127
 
128
  ## Notes
129
 
130
+ - **Resolution / duration**: width and height are multiples of 32 (short edge
131
+ typically 768). Frame count is at 24 fps and snaps to the model's 17·k+5 grid
132
  (124 ≈ 5 s). Validated range ~124–362 frames (~5–15 s).
133
  - **VRAM**: the base model is large (~33 B); an 80 GB GPU is comfortable at the
134
+ largest resolutions. The ComfyUI node streams the base and adds the `low_vram`
135
+ switch, so it runs on much smaller GPUs. In the standalone script,
136
  `--offload-adaln` trades ~13 GB of VRAM for CPU RAM.
137
  - **Audio**: 32 kHz stereo, aligned to the video; the two streams ride different
138
+ flow schedules and are integrated each on its own clock. (Audio is one of the
139
+ two areas still being improved — see the top.)