> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# MiniMax H3 Image API：在 ComfyUI 中进行文生图与图像编辑

> 通过 ComfyUI 合作伙伴 API 使用 MiniMax H3 Image，根据提示词生成 2K 或 4K 图像，或编辑最多 16 张参考图像。

MiniMax H3 Image 是 MiniMax 的图像模型，可通过 **MiniMax H3 Image** 合作伙伴节点在 ComfyUI 中使用。文生图与图像编辑使用的是同一个节点：未连接参考图像时，它会根据你的提示词生成图像；连接了参考图像时，它会对这些图像进行编辑或组合。

这些工作流通过你的 Comfy API 账户在 MiniMax 的服务器上运行，因此无需下载模型，也无需管理本地 GPU。

> [!TIP]
>
> 使用 API 节点需要保证你已经正常登录，并在受许可的网络环境下使用，请参考[API 节点总览](https://docs.comfy.org/zh/tutorials/partner-nodes/overview.md)部分文档来了解使用 API 节点的具体使用要求。

> [!TIP]
>
> > [tab] 本地用户
> >
> > 请确保你的 ComfyUI 已经更新。
> >
> > * [ComfyUI 下载](https://www.comfy.org/download)
> > * [ComfyUI 更新教程](https://docs.comfy.org/zh/installation/update_comfyui.md)
> >
> > 本指南里的工作流可以在[工作流模板](https://docs.comfy.org/zh/interface/features/template.md)中找到。如果找不到，可能是 ComfyUI 没有更新。
> >
> > 如果加载工作流时有节点缺失，可能原因有：
> >
> > 1. 你用的不是最新版（每夜版）。
> > 2. 启动时有些节点导入失败。
>
> > [tab] 云端用户
> >
> > * [Cloud](https://cloud.comfy.org) 会在 ComfyUI 稳定版本发布后更新。
> >
> > 所以，如果你发现本文档中有任何核心节点缺失，可能是因为新核心节点尚未在最新稳定版中发布。请等待下一个稳定版发布。

## MiniMax H3 Image 擅长什么

* **2K 和 4K 输出**：选择尺寸档位和宽高比，或设置精确的宽度和高度
* **图像编辑**：最多可编辑或组合 16 张参考图像，在提示词中以 `@Image1` 至 `@Image16` 引用
* **提示词重写**：MiniMax 默认会将简短提示词扩展为详细的场景描述，并随图像一并返回重写后的提示词
* **海报级细节**：适合需要清晰文字和密集细节的海报、包装和编辑类图像

## 文本到图像

根据提示词生成 2K 或 4K 图像。

![MiniMax H3 Image 文本到图像工作流预览](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/api_minimax_h3_image_t2i-1.webp)

> [card] [下载工作流](https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_minimax_h3_image_t2i.json)
>
> 下载 JSON，或在模板库中搜索 "MiniMax-H3-Image: Text to Image (API)"

## 图像编辑

连接一张来源图像并描述所需的修改，只有提示词要求的内容会被重写。该模板会在一张已完成的渲染图中添加一位女性，并保留画面其余部分。

![MiniMax H3 图像编辑工作流预览](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/api_minimax_h3_image_image_edit-1.webp)

> [card] [下载工作流](https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_minimax_h3_image_image_edit.json)
>
> 下载 JSON，或在模板库中搜索 "MiniMax-H3-Image: Image Edit (API)"

**输入素材**

> [card] [surreal\_rendering\_modern.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/surreal_rendering_modern.png)
>
> `LoadImage` · `surreal_rendering_modern.png`

## 选项

| 输入 | 取值 | 说明 |
| :- | :- | :- |
| `model` | `MiniMax-H3-Image`、`MiniMax-H3-Image-Highspeed` | 在模板中更改 `model` 下拉选项即可切换 |
| `size` | `2K`、`4K`、`custom` | 2K 和 4K 会根据宽高比推导出宽度和高度。`custom` 的宽度和高度各为 512 至 7680 px，总像素为 655,360 至 20,000,000 px，宽高比最大为 3:1 |
| `aspect_ratio` | `auto` 加上 15 种固定比例 | `auto` 会跟随提示词；若连接了参考图像，则跟随该图像 |
| `enhance_prompt` | 默认开启 | MiniMax 会先把提示词改写为详细的场景描述。编辑操作始终会执行增强，因此关闭它只影响文生图，此时需要选择固定比例或自定义尺寸 |
| `images` | 最多 16 张 | 用于编辑与合成的参考图像。在提示词中按连接顺序以 `@Image1`、`@Image2` 等引用它们 |

连接参考图像时，提示词最多可达 8,000 个字符。节点还会在图像旁一并返回改写后的 `revised_prompt`。

## 开始使用

1. 将 ComfyUI 更新至 0.45.1 或更高版本
2. 在模板库中搜索 `MiniMax-H3-Image`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.