> For the complete documentation index, see [llms.txt](https://unsloth.ai/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://unsloth.ai/docs/zh/mo-xing/minimax-h3.md).

# MiniMax-H3：如何在本地运行

在本地运行 MiniMax-H3，生成带声音的视频，并使用 Unsloth 训练 MiniMax-H3 视频 LoRA。

**MiniMax-H3** 是 MiniMax 推出的开源视频模型。它可以根据文本提示词生成视频及其配乐，并可选择提供起始帧和结束帧，或参考图片、视频和音频。使用 [Unsloth](https://unsloth.ai/docs/zh/desktop.md) 搭配 Unsloth FP8 仓库运行，也可以用带声音的短片训练自己的 MiniMax-H3 LoRA。

{% columns %}
{% column width="50%" %}

* 片段为 24 fps，时长为 5.2 至 14.4 秒。
* 默认设置： **20 步**, **864 × 480**，5.2 秒。
* 生成一段 864 × 480 视频约需 **30 秒** （使用 RTX PRO 6000）。
* LoRA 训练：约需 **36 分钟** 完成 400 步训练，峰值显存占用为 49.7 GB。

MiniMax-H3： [FP8](https://huggingface.co/unsloth/MiniMax-H3-FP8) • [GGUF](https://huggingface.co/unsloth/MiniMax-H3-GGUF) • [原始模型](https://huggingface.co/MiniMaxAI/MiniMax-H3)

在配备 96 GB 显存的 RTX PRO 6000 上，使用 Unsloth 2026.11.4 和从 main 分支构建的版本进行测试。
{% endcolumn %}

{% column width="50%" %}

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fyc83EeZRTERrxk24F75C%2Fminimax-h3-out-forest.webp?alt=media" alt="Aerial view over a misty pine forest and a winding river at sunrise"><figcaption><p>FP8 仓库，864 × 480，5.2 秒（预览无声音）</p></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

#### MiniMax-H3 LoRA 微调——前后对比

[微调 MiniMax-H3：前后对比示例](https://unsloth.ai/docs/zh/mo-xing/minimax-h3/fine-tune-minimax-h3.md#minimax-h3-lora-finetuning-before-and-after)

Unsloth 也支持微调 MiniMax-H3！例如，使用 Unsloth 中的原始 bf16 模型，设置为 864 × 480、5.2 秒、20 步，种子为 42。提示词："bbbstyle, a sunny meadow with a big oak tree and a small stream, birds chirping"。以下展示微调前后风格的变化：

<div><figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FY40HyPvTZusQH0RDXU4I%2Fminimax-h3-lora-studio-before.webp?alt=media" alt="Without the LoRA: a realistic meadow with a big oak tree and a small stream under a blue sky"><figcaption><p>未使用 LoRA</p></figcaption></figure> <figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FQxzr4zJRmMzlFE6OHCDi%2Fminimax-h3-lora-studio-after.webp?alt=media" alt="With the LoRA: the same meadow in a 3D animated film look, with a stylized oak tree, bright green grass and a small stream"><figcaption><p>使用 bbbstyle LoRA，训练 200 步</p></figcaption></figure></div>

### 显存需求

| 任务              | 下载                                                    | 总计       | GPU 显存                       |
| --------------- | ----------------------------------------------------- | -------- | ---------------------------- |
| **运行** （快速 FP8） | INT8 视频模型 20.3 GB，INT8 Qwen3-VL 32B 文本编码器 27.1 GB，VAE | 约 50 GB  | 占用 54 GB                     |
| **训练 LoRA**     | 原始 bf16 仓库：视频模型 66.3 GB，文本编码器 66.7 GB，VAE 11.1 GB     | 约 144 GB | 峰值占用 49.7 GB，建议使用 80 GB 以上显存 |

训练时会先加载 63 GB 的文本编码器对字幕进行编码，然后在加载视频模型前释放该编码器。

### 快速入门

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FWti8xb1Y3sOQBfG8oXMd%2Fminimax-h3-flow.webp?alt=media" alt="Animation: pick MiniMax H3 (Fast FP8), choose Text and frames, type a prompt, click Generate and play the forest clip" width="563"><figcaption><p>加速版 Unsloth 工作流</p></figcaption></figure>

{% stepper %}
{% step %}

#### 安装 Unsloth

使用 [Unsloth Desktop 应用](https://unsloth.ai/docs/zh/desktop.md) ，或在终端中安装。

<a href="https://unsloth.ai/download" class="button primary" data-icon="down-to-bracket">下载 Unsloth</a>

MacOS、Linux、WSL：

```bash
curl -fsSL https://unsloth.ai/install.sh | sh
```

Windows PowerShell：

```powershell
irm https://unsloth.ai/install.ps1 | iex
```

启动 Unsloth 并打开 `http://localhost:8888`:

```bash
unsloth studio -H 0.0.0.0 -p 8888
```

{% endstep %}

{% step %}

#### 打开视频

在侧边栏中打开 **图像** ，然后点击 **视频** （位于右上角），或前往 `http://localhost:8888/video`.

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FqCq3GkDxVruGcu5LGHPi%2Fminimax-h3-video-page.png?alt=media" alt="The Unsloth Video page with the Create tab open and no model loaded"><figcaption><p>视频页面</p></figcaption></figure>
{% endstep %}

{% step %}

#### 选择 MiniMax-H3

点击 **选择视频模型**，搜索 `MiniMax-H3` 并选择 **MiniMax H3（Fast FP8）**.

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FbRd7iMQUQKMxQt8erID0%2Fminimax-h3-picker.png?alt=media" alt="Model picker search results for MiniMax-H3 with the Fast FP8, GGUF, FP8 and original entries" width="540"><figcaption><p>模型选择器</p></figcaption></figure>

选择一种模式：

* **文本和帧**：提示词，可选择设置起始帧和结束帧。
* **参考素材**：参考图片、视频和音频。需要单独下载模型。

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FG589ovJjwsvgaLILbmrH%2Fminimax-h3-mode.png?alt=media" alt="Dialog: Choose how MiniMax H3 should generate, with the Text and frames and References options" width="450"><figcaption><p>模式对话框</p></figcaption></figure>
{% endstep %}

{% step %}

#### 设置提示词和参数

描述场景、摄像机和声音。在 **训练分辨率** 下选择尺寸，并设置 **时长**。Unsloth 会自动填充其他设置。

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FA3ocFMljlYqyFZIVQnGg%2Fminimax-h3-settings.png?alt=media" alt="Create panel with the forest prompt, empty start and end frames, 864 by 480, 5.2 seconds and 124 frames, 24 fps, 20 steps, motion shift 12, audio shift 3 and seed 42" width="400"><figcaption><p>生成设置</p></figcaption></figure>
{% endstep %}

{% step %}

#### 生成

点击 **生成**。视频会在预览中播放，并带有声音。使用 **配方** 查看设置，或点击 **下载** 保存视频。

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F1kKizKGOjO83IGdw1PAa%2Fminimax-h3-result.png?alt=media" alt="Finished video of a misty pine forest and river at sunrise in the Video page preview, with the gallery below"><figcaption><p>生成结果，随机种子 42</p></figcaption></figure>

首次生成视频时需要编译模型，耗时几分钟。
{% endstep %}
{% endstepper %}

提示词：“一段缓慢的航拍镜头掠过薄雾笼罩的松林和蜿蜒的河流，日出时分，金色阳光穿透雾气，鸟儿鸣叫，水流冲过岩石。电影感的自然风光片。”

### 起始帧、结束帧和参考素材

* **起始帧**：视频从你的图片开始。将图片拖放到 **起始帧**.
* **结束帧**：视频以你的图片结束。两者都设置后，即可生成两张图片之间的过渡。
* **参考素材**：以 **参考素材** 模式加载 MiniMax-H3，使用图片、视频和音轨引导视频生成。
* 图片宽高比必须在 1:4 到 4:1 之间。在提示词中描述帧与帧之间的运动。

### 推荐设置

| 设置项      | 数值                                            |
| -------- | --------------------------------------------- |
| **步数**   | 20                                            |
| **引导强度** | 不使用（经过引导蒸馏）                                   |
| **帧率**   | 24 fps                                        |
| **时长**   | 5.2 秒（124 帧）至 14.4 秒（345 帧），以 17 帧为步长         |
| **大小**   | 起始分辨率为 864 × 480；最高可达 1344 × 768 或 1536 × 672 |
| **运动偏移** | 12                                            |
| **音频偏移** | 3                                             |
| **种子**   | 输入任意数字即可重复生成结果                                |

#### T4 及其他不支持 bf16 的 GPU

使用 **GGUF** 条目。由于不支持 bf16，FP8 仓库和原始权重会回退到 float32，需要约 288 GB 系统内存。因此，在内存较小的机器上，Unsloth 会在下载任何内容之前拒绝加载它们，并指引你使用 GGUF 版本（需要 Unsloth 版本高于 2026.11.4）。

在配备 15 GB 内存的 Colab T4 上，使用 GGUF **UD-Q2\_K\_XL** 搭配 Q2\_K\_M 文本编码器，渲染分辨率为 864 x 480、124 帧、20 步，耗时约 **34 分钟** 每段视频约需 26 GB 系统内存。

### 训练 LoRA

请参阅 [微调 MiniMax-H3](https://unsloth.ai/docs/zh/mo-xing/minimax-h3/fine-tune-minimax-h3.md) 了解如何微调 MiniMax-H3。示例中可以看到，这两段视频在 RTX PRO 6000 上各耗时约 10 分钟（包括加载时间）。右侧是使用 400 步 LoRA 处理的同一对视频。

<div><figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FQ9SnobeErT5EubX2JC3I%2Fminimax-h3-lora-meadow-before.webp?alt=media" alt="Without the LoRA: a realistic meadow with a big oak tree and a small stream under a blue sky"><figcaption><p>未使用 LoRA</p></figcaption></figure> <figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FLrEdDhkeBntupm1TbjDb%2Fminimax-h3-lora-meadow-after.webp?alt=media" alt="With the LoRA: the same meadow in a 3D animated film look, with stylized oak trees, soft light and a small animated character"><figcaption><p>使用 bbbstyle LoRA，训练 400 步</p></figcaption></figure></div>

#### 使用 LoRA

参见 [微调 MiniMax-H3](https://unsloth.ai/docs/zh/mo-xing/minimax-h3/fine-tune-minimax-h3.md#use-the-lora)

#### 在 Unsloth 之外：diffusers

参见 [微调 MiniMax-H3](https://unsloth.ai/docs/zh/mo-xing/minimax-h3/fine-tune-minimax-h3.md#outside-unsloth-diffusers)

### 故障排除

参见 [微调 MiniMax-H3](https://unsloth.ai/docs/zh/mo-xing/minimax-h3/fine-tune-minimax-h3.md#troubleshooting)

<details>

<summary>视频模型选择器中没有 MiniMax-H3</summary>

[更新 Unsloth](https://unsloth.ai/docs/get-started/install/updating) 并重新启动。如果已加载模型，请在选择器中点击 **推荐** 。

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://unsloth.ai/docs/zh/mo-xing/minimax-h3.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
