README.md
| 1 | --- |
| 2 | license: apache-2.0 |
| 3 | base_model: Comfy-Org/MiniMax-H3 |
| 4 | tags: |
| 5 | - text-to-video |
| 6 | - text-to-audio |
| 7 | - audio-video |
| 8 | - lora |
| 9 | - minimax-h3 |
| 10 | - comfyui |
| 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 | ## Which checkpoint — `v4` (step 600) or `v1` (850)? |
| 22 | |
| 23 | For **most** work, use **`minimax_h3_turbo_v4_step600_ema.safetensors`**. It's the |
| 24 | strongest checkpoint we've released: much better static and small-motion shots, |
| 25 | markedly better micro-detail (faces, fingers, fine texture), and the |
| 26 | over-sharpening / plastic look of the earlier `v1` (~850) line is **fully |
| 27 | resolved**. |
| 28 | |
| 29 | v4 introduced a **static-frame enhancement** — a big win for static and |
| 30 | small-motion content. The one trade-off shows up **only at 4 steps with large, |
| 31 | fast motion**, where v4 can produce **motion-smear / trailing ghosting** (we're |
| 32 | actively fixing this). Two things address it: |
| 33 | |
| 34 | - **Use 6–8 steps.** This **largely removes the smear** and is where v4 looks its |
| 35 | best. v4 also tolerates higher step counts better than v1, which tends to |
| 36 | over-sharpen at high steps + strength 1.0. |
| 37 | - For the specific case of **4 steps *and* heavy motion**, the older **`v1` ~850** |
| 38 | checkpoint can still be the friendlier pick. |
| 39 | |
| 40 | ``` |
| 41 | Using 6–8 steps? ── yes ──► v4-600 (recommended) |
| 42 | │ no (4 steps) |
| 43 | ▼ |
| 44 | Heavy / fast motion? ── no ──► v4-600 (recommended) |
| 45 | │ yes |
| 46 | ▼ |
| 47 | v1-850 (friendlier at 4-step heavy motion) |
| 48 | ``` |
| 49 | |
| 50 | Still a preview — training continues; the two areas still being improved are |
| 51 | **audio** and **behaviour under fast, intense motion**. |
| 52 | |
| 53 | ## Steps and strength — read this |
| 54 | |
| 55 | - **4 steps is the recommended *minimum*; 4–8 is the useful range.** 6–8 steps |
| 56 | look noticeably better than 4, so add steps if you can afford them. Past **8 |
| 57 | steps** it stops helping and can start to introduce **over-sharp artifacts** — |
| 58 | there's no benefit to going higher, so stay in **4–8**. |
| 59 | - **Keep strength at `1.0`.** It's tuned for 1.0 and holds up well across the 4–8 |
| 60 | step range. Only reach for the strength dial if a *specific* clip misbehaves — |
| 61 | then **blurry ghosting / smear → nudge up** (`~1.05–1.2`), **over-sharp grain → |
| 62 | nudge down** (`~0.8–0.95`). |
| 63 | - Keep the scheduler on `simple`. |
| 64 | |
| 65 | ## Use it in ComfyUI (recommended) |
| 66 | |
| 67 | Custom nodes: **[Larryvrh/ComfyUI-MiniMax-H3-Turbo](https://github.com/Larryvrh/ComfyUI-MiniMax-H3-Turbo)** |
| 68 | — or search **"MiniMax-H3 Turbo"** in ComfyUI-Manager. (Keep the node updated; it |
| 69 | evolves alongside these weights.) |
| 70 | |
| 71 | 1. Install the nodes (Manager, or `git clone` into `ComfyUI/custom_nodes`) and put |
| 72 | a `.safetensors` from this repo into `ComfyUI/models/loras/`. You also need the |
| 73 | base MiniMax-H3 model, VAEs and text encoder — see the |
| 74 | [MiniMax-H3 tutorial](https://docs.comfy.org/tutorials/video/minimax/minimax-h3). |
| 75 | 2. Start from the official MiniMax-H3 workflow (t2v or i2v) and make two changes: |
| 76 | - insert **MiniMax-H3 Turbo LoRA** between the model loader and the sampler; |
| 77 | - feed `SamplerCustomAdvanced` from **MiniMax-H3 Turbo Sampler**, and set the |
| 78 | scheduler to `simple` at **≥ 4 steps**. |
| 79 | |
| 80 | Everything else stays as in the official graph, so both text-to-video and |
| 81 | image-to-video work. A ready-made t2v workflow ships in the |
| 82 | [node repo](https://github.com/Larryvrh/ComfyUI-MiniMax-H3-Turbo/tree/main/example_workflows) |
| 83 | (and here as `minimax_h3_t2v_turbo.json`) — drag it in. |
| 84 | |
| 85 | - **Base model**: any MiniMax-H3 base — full (`bf16`, `int8_convrot`) **and the |
| 86 | pruned/curve variants** (`pruned_int8`, `pruned_fp8`). The node auto-detects a |
| 87 | pruned base and re-injects the time-conditioning at run time, so **one LoRA file |
| 88 | covers every base**. |
| 89 | - **`low_vram`** switch: **off** applies the LoRA at run time (sharpest, |
| 90 | recommended); **on** merges it into the weights for the lowest peak VRAM (a bit |
| 91 | softer on quantized bases). Turn it on only if you run out of memory. |
| 92 | - The custom sampler **auto-adapts to your ComfyUI version**: MiniMax-H3 runs |
| 93 | video and audio on two different flow schedules; recent ComfyUI handles that |
| 94 | natively (`ModelSamplingAV`) and older ComfyUI doesn't — the Turbo Sampler |
| 95 | detects which and does the right thing either way, so nothing to change when you |
| 96 | update ComfyUI. |
| 97 | |
| 98 | ## Weights |
| 99 | |
| 100 | All bf16, ~744 MB, applied as a plain low-rank update |
| 101 | (`W_eff = W + lora_B @ lora_A`, alpha = rank, so no extra scaling). **Prefer the |
| 102 | EMA files**; the non-EMA ones are for comparison. |
| 103 | |
| 104 | | file | notes | |
| 105 | |---|---| |
| 106 | | **`minimax_h3_turbo_v4_step600_ema.safetensors`** | **recommended — current best.** Strong static/small-motion, good micro-detail, no over-sharpening. | |
| 107 | | `minimax_h3_turbo_v4_step600.safetensors` | v4-600 non-EMA (comparison). | |
| 108 | | `minimax_h3_turbo_v4_step150_ema.safetensors` | earlier v4 checkpoint. | |
| 109 | | `minimax_h3_turbo_4step_ema_ckpt850.safetensors` | `v1` line (~850) — over-sharpened / plastic in general, but the friendlier pick for **4-step heavy motion** (see above). | |
| 110 | | `minimax_h3_turbo_4step_ema_ckpt500.safetensors` | older `v1` (~500), softer. | |
| 111 | | `minimax_h3_turbo_4step_ema.safetensors` | initial release (~200). | |
| 112 | |
| 113 | *Naming:* `v4` is the current training recipe and `stepN` is the training step. |
| 114 | Older files carry the previous `4step_ckptN` naming, where `4step` referred to the |
| 115 | sampler-step count. |
| 116 | |
| 117 | ## Standalone (no ComfyUI graph) |
| 118 | |
| 119 | `generate.py` is a single self-contained file — it loads the base DiT + a LoRA, |
| 120 | encodes the prompt, runs the few-step dual-schedule sampler, decodes and muxes an |
| 121 | mp4. It still needs a ComfyUI checkout for the H3 model / VAE / text-encoder |
| 122 | definitions: |
| 123 | |
| 124 | ```bash |
| 125 | git clone https://github.com/comfyanonymous/ComfyUI |
| 126 | cd ComfyUI && pip install -r requirements.txt && cd .. |
| 127 | pip install -r requirements.txt # this repo: torch, safetensors, imageio-ffmpeg |
| 128 | |
| 129 | # base weights from Comfy-Org/MiniMax-H3 into a models/ tree, then: |
| 130 | python generate.py \ |
| 131 | --comfyui ./ComfyUI \ |
| 132 | --base models/diffusion_models/minimax_h3_fl2va_bf16.safetensors \ |
| 133 | --lora minimax_h3_turbo_v4_step600_ema.safetensors \ |
| 134 | --te models/text_encoders/qwen3vl_32b_minimax_h3_int8_convrot.safetensors \ |
| 135 | --video-vae models/vae/minimax_h3_video_vae_fp16.safetensors \ |
| 136 | --audio-vae models/vae/minimax_h3_audio_vae_fp32.safetensors \ |
| 137 | --prompt "A corgi in a chef hat flipping a pancake, sizzling sounds and a cheerful bark." \ |
| 138 | --width 1344 --height 768 --frames 124 --steps 6 --out corgi.mp4 |
| 139 | ``` |
| 140 | |
| 141 | ## Notes |
| 142 | |
| 143 | - **Resolution / duration**: width and height are multiples of 32 (short edge |
| 144 | typically 768). Frame count is at 24 fps and snaps to the model's 17·k+5 grid |
| 145 | (124 ≈ 5 s). Validated range ~124–362 frames (~5–15 s). |
| 146 | - **VRAM**: the base model is large (~33 B); an 80 GB GPU is comfortable at the |
| 147 | largest resolutions. The ComfyUI node streams the base and adds the `low_vram` |
| 148 | switch, so it runs on much smaller GPUs. In the standalone script, |
| 149 | `--offload-adaln` trades ~13 GB of VRAM for CPU RAM. |
| 150 | - **Audio**: 32 kHz stereo, aligned to the video; the two streams ride different |
| 151 | flow schedules and are integrated each on its own clock. (Audio is one of the |
| 152 | two areas still being improved — see the top.) |
| 153 | |