MiniMax H3 Turbo Lora ComfyUI

提供商drbaph
分类text-to-video
许可证apache-2.0
下载量135.1K
星标0

简介

MiniMax H3 Turbo Lora 是专为 ComfyUI 设计的视频生成增强插件,旨在通过 Lora 微调技术提升视频生成的可控性和视觉质量。对于习惯使用 ComfyUI 工作流的开发者来说,它将 MiniMax 强大的视频生成能力引入了节点式编辑环境,让用户能更灵活地控制视频风格和动态效果,而非依赖简单的提示词。其上手难度中等,核心在于如何通过 Lora 权重调优来实现精准的视觉表达,是目前将商业级视频大模型与开源工作流结合的实用方案。

核心亮点

  • 深度集成 ComfyUI,支持节点化精准控制
  • 通过 Lora 微调显著提升视频风格一致性
  • 降低视频生成门槛,实现高效的快速迭代
  • Apache-2.0 协议,对开发者非常友好

使用方法

安装依赖
# 安装 Hugging Face transformers
pip install transformers torch
SDK 使用
# 使用 transformers 加载模型
from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("drbaph/MiniMax-H3-Turbo-Lora-ComfyUI")
tokenizer = AutoTokenizer.from_pretrained("drbaph/MiniMax-H3-Turbo-Lora-ComfyUI")

Hugging Face 下载

我们推荐使用命令行或者 Hugging Face Hub SDK 来进行模型的下载。

操作指引:在下载前,请先通过如下命令安装 huggingface_hub:

操作指引
pip install -U huggingface_hub

命令行下载

下载完整模型库

下载完整模型库
huggingface-cli download drbaph/MiniMax-H3-Turbo-Lora-ComfyUI

下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)

下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)
huggingface-cli download drbaph/MiniMax-H3-Turbo-Lora-ComfyUI config.json --local-dir ./dir

更多命令行下载选项,可参见官方文档

SDK 下载

SDK 下载
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('drbaph/MiniMax-H3-Turbo-Lora-ComfyUI')

Git 下载

请确保 lfs 已经被正确安装

Git 下载
git lfs install
git clone https://huggingface.co/drbaph/MiniMax-H3-Turbo-Lora-ComfyUI

如果您希望跳过 lfs 大文件下载,可以使用如下命令

跳过 LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/drbaph/MiniMax-H3-Turbo-Lora-ComfyUI

模型文件托管在 Hugging Face Hub,使用 HF CLI / SDK / Git 直接下载,不经过本站。

PyTorch / Transformers 使用

安装 Transformers

安装 Transformers
pip install -U transformers torch

模型加载和推理

模型加载和推理
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained('drbaph/MiniMax-H3-Turbo-Lora-ComfyUI')
tokenizer = AutoTokenizer.from_pretrained('drbaph/MiniMax-H3-Turbo-Lora-ComfyUI')

完整文档

来源: HuggingFace

---
license: apache-2.0
base_model: Comfy-Org/MiniMax-H3
base_model_relation: adapter
pipeline_tag: text-to-video
tags:
- minimax-h3
- lora
- adapter
- comfyui
- text-to-video
- reference-to-video
- audio-video
- synchronized-audio
- few-step
- turbo
- accelerated-inference
- lightx2v
- dynamic-rank
- svd
- safetensors
- bfloat16
- pruned-model
- curve-form
---

MiniMax-H3 Turbo LoRAs for ComfyUI

This repository contains MiniMax-H3 Turbo LoRAs converted and optimized for ComfyUI:

  • pruned/curve-form compatibility conversions of the Turbo LoRAs released by larryvrh.

These LoRAs accelerate MiniMax-H3 video and synchronized-audio generation by reducing the required number of sampling steps.

---

Update — LightX2V FL2V and Ref2V Dynamic-Rank LoRAs

Three dynamically resized BF16 LoRAs are now included. Their source weights were published in the correct MiniMax-H3 ComfyUI layout by:

lightx2v/Minimax-h3-Turbo

New files

| File | Source | Purpose |
| --- | --- | --- |
| minimax_h3_fl2v_turbo_4step_v1.0_768p_comfyui_resized_avg_rank_21_bf16.safetensors | minimax_h3_fl2v_turbo_4step_v1.0_768p_comfyui_bf16.safetensors | Four-step 768p FL2V generation. |
| minimax_h3_fl2v_turbo_8step_v1.0_comfyui_resized_avg_rank_21_bf16.safetensors | minimax_h3_fl2v_turbo_8step_v1.0_comfyui_bf16.safetensors | Eight-step FL2V generation with a greater quality focus. |
| minimax_h3_ref2v_turbo_4step_v0.1_comfyui_resized_avg_rank_21_bf16.safetensors | minimax_h3_ref2v_turbo_4step_v0.1_comfyui_bf16.safetensors | Four-step reference-to-video generation. |
| minimax_h3_fl2v_turbo_4step_v1.1_768p_comfyui_resized_avg_rank_64_bf16.safetensors | minimax_h3_fl2v_turbo_4step_v1.1_768p_comfyui_bf16.safetensors | Four-step 768p FL2V generation, high-fidelity dynamic-rank resize. |
| minimax_h3_fl2v_turbo_4step_v1.1_768p_comfyui_resized_avg_rank_28_bf16.safetensors | minimax_h3_fl2v_turbo_4step_v1.1_768p_comfyui_bf16.safetensors | Four-step 768p FL2V generation, compact dynamic-rank resize. |

The LightX2V files were already supplied in the correct ComfyUI namespace and QKV layout. No namespace conversion or AdaLN pruning was required.

How the LoRAs were resized

Each LoRA was compressed using an exact compact SVD calculated from its LoRA A/B factors without materializing the full dense weight updates.

The process:

1. Treats every attention, MLP and token-refiner projection independently.
2. Separates fused QKV adapters into their original Q, K and V projections.
3. Calculates the exact singular spectrum of each effective B @ A update.
4. Selects a dynamic rank independently for every projection.
5. Preserves one additional safety rank beyond the Frobenius-energy threshold.
6. Rebuilds balanced factors as A = sqrt(S) × Vh and B = U × sqrt(S).
7. Re-fuses Q, K and V using concatenated A factors and a block-diagonal B matrix.
8. Bakes the source alpha / rank scale into lora_B.
9. Removes the no-longer-required alpha tensors.
10. Saves all output tensors as BF16.

All three files target the same projection-level average rank:

  • Rank sum: 6778
  • Projection count: 312
  • Average projection rank: 21.724359
  • Filename rank: floor(21.724359) = 21

Q, K and V are counted separately. The stored rank of a fused QKV adapter is the sum of its three independently selected ranks.

Resize results

| LoRA | Output size | Average rank | Mean Frobenius norm retained | Baked scale |
| --- | ---: | ---: | ---: | ---: |
| FL2V 4-step v1.0 768p | 284.36 MiB | 21.724359 | 94.95% | 1.0 |
| FL2V 8-step v1.0 | 311.89 MiB | 21.724359 | 97.72% | 0.0625 |
| Ref2V 4-step v0.1 | 311.79 MiB | 21.724359 | 98.33% | 0.0625 |
| FL2V 4-step v1.1 768p (rank 64) | 891.65 MiB | 64.500000 | 98.18% | 1.0 |
| FL2V 4-step v1.1 768p (rank 28) | 375.55 MiB | 28.500000 | 93.59% | 1.0 |

The Ref2V source was reduced from approximately 1,865.57 MiB to 311.79 MiB, an 83.29% reduction. The v1.1 768p source (1,865.57 MiB) was reduced to 891.65 MiB (−52.21%) at rank 64 and to 375.55 MiB (−79.87%) at rank 28.

A separate Frobenius threshold was solved for each LoRA because their singular-value distributions differ. Reusing one fixed threshold would not produce the same average rank.

Ref2V numerical validation

Direct comparison between the original and resized effective LoRA updates produced:

| Measurement | Result |
| --- | ---: |
| Global cosine similarity | 99.9190% |
| Global relative L2 error | 4.0234% |
| Mean projection Frobenius norm retained | 98.3332% |
| Minimum projection Frobenius norm retained | 96.4904% |
| Projection rank range | 2–105 |
| Size reduction | 83.29% |

These are numerical weight-reconstruction measurements, not a perceptual video-quality score.

FL2V 4-step v1.1 768p numerical validation

Direct comparison between the v1.1 source and each resized variant produced:

| Measurement | Rank 64 | Rank 28 |
| --- | ---: | ---: |
| Global cosine similarity | 99.1169% | 97.3279% |
| Global relative L2 error | 13.2601% | 22.9625% |
| Mean projection Frobenius norm retained | 98.1774% | 93.5945% |
| Minimum projection Frobenius norm retained | 98.0817% | 92.6661% |
| Projection rank range | 2–120 | 2–99 |
| Size reduction | 52.21% | 79.87% |

These are numerical weight-reconstruction measurements, not a perceptual video-quality score.

Structural validation

Every resized LightX2V file contains:

| Component | Count |
| --- | ---: |
| BF16 tensors | 416 |
| LoRA A/B pairs | 208 |
| Independently ranked projections | 312 |
| QKV modules | 52 |
| Alpha tensors | 0 |

Validation confirmed:

  • all tensors contain finite BF16 values;
  • every LoRA A tensor has a matching LoRA B tensor;
  • ComfyUI recognizes all 208 adapters and all 416 tensors;
  • no incompatible or unresolved tensors remain;
  • QKV rank columns remain block-diagonal and ordered as Q, K and V;
  • the original effective LoRA scale is preserved;
  • the exact average projection rank is 21.724359.

---

Workflow Example

The following output was generated with the recommended pruned-model workflow using the v4 step-600 EMA LoRA.

<video
src="https://huggingface.co/drbaph/MiniMax-H3-Turbo-Lora-ComfyUI/resolve/main/assets/MiniMax_H3_audio.mp4"
controls
loop
width="100%"> </video>

Current workflow

Download the current ComfyUI workflow

  • Workflow: fl_minimax_h3_turbo_lora_example_workflow.json
  • LoRA: minimax_h3_turbo_v4_step600_ema_pruned_comfyui.safetensors
  • Steps: 6–8
  • Sampler: Euler
  • Scheduler: Beta
  • LoRA strength: 1.0
  • Video sigma shift: 12
  • Audio sigma shift: 4–6

The previous workflow remains available here:

Download the previous workflow

View the previous workflow output

---

Included Files

LightX2V dynamic-rank LoRAs

| File | Description |
| --- | --- |
| minimax_h3_fl2v_turbo_4step_v1.0_768p_comfyui_resized_avg_rank_21_bf16.safetensors | Dynamic-SVD resize of the official LightX2V four-step 768p FL2V LoRA. |
| minimax_h3_fl2v_turbo_8step_v1.0_comfyui_resized_avg_rank_21_bf16.safetensors | Dynamic-SVD resize of the official LightX2V eight-step FL2V LoRA. |
| minimax_h3_ref2v_turbo_4step_v0.1_comfyui_resized_avg_rank_21_bf16.safetensors | Dynamic-SVD resize of the official LightX2V four-step Ref2V LoRA. |

Pruned/curve-form compatibility conversions

| File