Instructions to use larryvrh/MiniMax-H3-Turbo-Lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Inference
- Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -7,6 +7,7 @@ tags:
|
|
| 7 |
- audio-video
|
| 8 |
- lora
|
| 9 |
- minimax-h3
|
|
|
|
| 10 |
pipeline_tag: text-to-video
|
| 11 |
---
|
| 12 |
|
|
@@ -16,63 +17,63 @@ A LoRA for [MiniMax-H3](https://huggingface.co/Comfy-Org/MiniMax-H3) that render
|
|
| 16 |
joint **video + synchronized stereo audio** in **4 sampling steps** instead of
|
| 17 |
the usual ~20 β roughly a 5Γ speedup in sampling wall-clock.
|
| 18 |
|
| 19 |
-
> β οΈ **
|
| 20 |
-
> early
|
| 21 |
-
>
|
| 22 |
-
>
|
| 23 |
-
>
|
| 24 |
-
>
|
| 25 |
-
>
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
```bash
|
| 60 |
-
#
|
| 61 |
git clone https://github.com/comfyanonymous/ComfyUI
|
| 62 |
cd ComfyUI && git checkout 14b05228cef127ce529bc0c08660770d4af3e9a8
|
| 63 |
pip install -r requirements.txt && cd ..
|
|
|
|
| 64 |
|
| 65 |
-
#
|
| 66 |
-
pip install -r requirements.txt # torch, safetensors, imageio-ffmpeg, ...
|
| 67 |
-
|
| 68 |
-
# 3. base weights (from Comfy-Org/MiniMax-H3): the bf16 DiT, the int8 Qwen3-VL
|
| 69 |
-
# text encoder, and the video + audio VAEs, into a models/ tree.
|
| 70 |
-
|
| 71 |
-
# 4. generate
|
| 72 |
python generate.py \
|
| 73 |
--comfyui ./ComfyUI \
|
| 74 |
--base models/diffusion_models/minimax_h3_fl2va_bf16.safetensors \
|
| 75 |
-
--lora
|
| 76 |
--te models/text_encoders/qwen3vl_32b_minimax_h3_int8_convrot.safetensors \
|
| 77 |
--video-vae models/vae/minimax_h3_video_vae_fp16.safetensors \
|
| 78 |
--audio-vae models/vae/minimax_h3_audio_vae_fp32.safetensors \
|
|
@@ -80,20 +81,13 @@ python generate.py \
|
|
| 80 |
--width 1344 --height 768 --frames 124 --out corgi.mp4
|
| 81 |
```
|
| 82 |
|
| 83 |
-
`generate.py` is a single self-contained file: it loads the base DiT and merges
|
| 84 |
-
the LoRA, encodes the prompt with Qwen3-VL, runs 4-step sampling on the model's
|
| 85 |
-
native dual video/audio schedule, decodes both streams and muxes an mp4.
|
| 86 |
-
|
| 87 |
## Notes
|
| 88 |
|
| 89 |
-
- **Resolution / duration**: width
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
the budget; the schedule is the same either way.
|
| 98 |
-
- **Audio**: the model emits 32 kHz stereo aligned to the video; the two streams
|
| 99 |
-
ride different flow schedules and `generate.py` integrates each on its own.
|
|
|
|
| 7 |
- audio-video
|
| 8 |
- lora
|
| 9 |
- minimax-h3
|
| 10 |
+
- comfyui
|
| 11 |
pipeline_tag: text-to-video
|
| 12 |
---
|
| 13 |
|
|
|
|
| 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 |
+
> β οΈ **Early prototype β the weights *and* the tooling.** These weights are an
|
| 21 |
+
> early, under-trained checkpoint (not production quality), and the ComfyUI nodes
|
| 22 |
+
> below are prototype code: **functionality and compatibility are not
|
| 23 |
+
> guaranteed.** It is already a clear step up from the base model at 4 steps β
|
| 24 |
+
> sharper detail, cleaner and better-synced audio β but treat everything here as
|
| 25 |
+
> a work-in-progress taste, not a finished product. **If something breaks, please
|
| 26 |
+
> open an issue** on the [node repo](https://github.com/Larryvrh/ComfyUI-MiniMax-H3-Turbo/issues).
|
| 27 |
+
|
| 28 |
+
## Use it in ComfyUI (recommended)
|
| 29 |
+
|
| 30 |
+
Custom nodes: **[Larryvrh/ComfyUI-MiniMax-H3-Turbo](https://github.com/Larryvrh/ComfyUI-MiniMax-H3-Turbo)**
|
| 31 |
+
β or search **"MiniMax-H3 Turbo"** in ComfyUI-Manager.
|
| 32 |
+
|
| 33 |
+
1. Install the nodes (Manager, or `git clone` into `ComfyUI/custom_nodes`).
|
| 34 |
+
2. Download a `.safetensors` from this repo into `ComfyUI/models/loras/`.
|
| 35 |
+
3. Start from the official [MiniMax-H3 workflow](https://docs.comfy.org/tutorials/video/minimax/minimax-h3)
|
| 36 |
+
(text-to-video or image-to-video) and make two changes:
|
| 37 |
+
- insert **MiniMax-H3 Turbo LoRA** between the model loader and the sampler;
|
| 38 |
+
- replace the sampler feeding `SamplerCustomAdvanced` with **MiniMax-H3 Turbo
|
| 39 |
+
Sampler (4-step)**, and set the scheduler to **4 steps** (`simple`).
|
| 40 |
+
|
| 41 |
+
Everything else stays as in the official workflow, so both t2v and i2v work.
|
| 42 |
+
The custom sampler is required: MiniMax-H3 runs video and audio on two different
|
| 43 |
+
flow schedules, and a stock sampler over-steps the audio at 4 steps and it breaks.
|
| 44 |
+
|
| 45 |
+
## Weights
|
| 46 |
+
|
| 47 |
+
Three checkpoints, all bf16, ~744 MB, applied as a standard low-rank update
|
| 48 |
+
(`W_eff = W + lora_B @ lora_A`, alpha = rank so no extra scaling):
|
| 49 |
+
|
| 50 |
+
| file | ~steps | notes |
|
| 51 |
+
|---|---|---|
|
| 52 |
+
| `minimax_h3_turbo_4step_ema_ckpt500.safetensors` | ~500 | **newest, most-trained β recommended default** (time-averaged) |
|
| 53 |
+
| `minimax_h3_turbo_4step.safetensors` | ~200 | initial release, trained weights β a bit sharper on very fast motion |
|
| 54 |
+
| `minimax_h3_turbo_4step_ema.safetensors` | ~200 | initial release, time-averaged β softer; superseded by the ckpt500 file |
|
| 55 |
+
|
| 56 |
+
Training is ongoing; newer checkpoints will land here over time.
|
| 57 |
+
|
| 58 |
+
## Standalone (no ComfyUI graph)
|
| 59 |
+
|
| 60 |
+
`generate.py` is a single self-contained file β loads the base DiT + a LoRA,
|
| 61 |
+
encodes the prompt, runs the 4-step dual-schedule sampler, decodes and muxes an
|
| 62 |
+
mp4. It still needs a ComfyUI checkout for the H3 model / VAE / text-encoder
|
| 63 |
+
definitions:
|
| 64 |
|
| 65 |
```bash
|
| 66 |
+
# ComfyUI (pinned to the commit these weights were validated against)
|
| 67 |
git clone https://github.com/comfyanonymous/ComfyUI
|
| 68 |
cd ComfyUI && git checkout 14b05228cef127ce529bc0c08660770d4af3e9a8
|
| 69 |
pip install -r requirements.txt && cd ..
|
| 70 |
+
pip install -r requirements.txt # this repo: torch, safetensors, imageio-ffmpeg
|
| 71 |
|
| 72 |
+
# base weights from Comfy-Org/MiniMax-H3 into a models/ tree, then:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
python generate.py \
|
| 74 |
--comfyui ./ComfyUI \
|
| 75 |
--base models/diffusion_models/minimax_h3_fl2va_bf16.safetensors \
|
| 76 |
+
--lora minimax_h3_turbo_4step_ema_ckpt500.safetensors \
|
| 77 |
--te models/text_encoders/qwen3vl_32b_minimax_h3_int8_convrot.safetensors \
|
| 78 |
--video-vae models/vae/minimax_h3_video_vae_fp16.safetensors \
|
| 79 |
--audio-vae models/vae/minimax_h3_audio_vae_fp32.safetensors \
|
|
|
|
| 81 |
--width 1344 --height 768 --frames 124 --out corgi.mp4
|
| 82 |
```
|
| 83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
## Notes
|
| 85 |
|
| 86 |
+
- **Resolution / duration**: width/height are multiples of 32; the short edge is
|
| 87 |
+
typically 768. Frame count is at 24 fps and snaps to the model's 17Β·k+5 grid
|
| 88 |
+
(124 β 5 s). Validated range ~124β362 frames (~5β15 s).
|
| 89 |
+
- **VRAM**: the base model is large (~33 B); an 80 GB GPU is comfortable
|
| 90 |
+
(`--offload-adaln` in the standalone script trades ~13 GB of VRAM for CPU RAM).
|
| 91 |
+
- **Steps**: 4 is the design point, scheduler `simple`.
|
| 92 |
+
- **Audio**: 32 kHz stereo, aligned to the video; the two streams ride different
|
| 93 |
+
flow schedules and are integrated each on its own clock.
|
|
|
|
|
|
|
|
|