> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-mintlify-b90d3c69.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# GrokImageEditNode - ComfyUI Built-in Node Documentation

> Complete documentation for the GrokImageEditNode node in ComfyUI. Learn its inputs, outputs, parameters and usage.

Grok 图像编辑节点根据文本提示修改现有图像。它使用 Grok API 生成一个或多个基于输入图像变体的新图像，并由您的描述进行引导。

## 输入

| 参数                 | 描述                                                             | 数据类型   | 是否必填 | 取值范围                                                                                                                                                                                        |
| ------------------ | -------------------------------------------------------------- | ------ | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `model`            | 用于图像编辑的特定 AI 模型。                                               | COMBO  | 是    | `"grok-imagine-image-quality"`<br />`"grok-imagine-image-pro"`<br />`"grok-imagine-image"`<br />`"grok-imagine-image-beta"`                                                                 |
| `image`            | 待编辑的输入图像。最多支持 3 张输入图像，但 "pro" 模型仅支持 1 张。                       | IMAGE  | 是    |                                                                                                                                                                                             |
| `prompt`           | 用于生成编辑后图像的文本提示。去除首尾空白后至少需要 1 个字符。                              | STRING | 是    |                                                                                                                                                                                             |
| `resolution`       | 输出图像的分辨率。                                                      | COMBO  | 是    | `"1K"`<br />`"2K"`                                                                                                                                                                          |
| `number_of_images` | 生成的编辑图像数量（默认值：1）。                                              | INT    | 否    | 1 到 10                                                                                                                                                                                      |
| `seed`             | 用于决定节点是否重新运行的种子；实际结果与种子无关，具有不确定性（默认值：0）。                       | INT    | 否    | 0 到 2147483647                                                                                                                                                                              |
| `宽高比`              | 输出图像的宽高比。仅当多张图像连接到图像输入时允许设置。如果设置为 "auto"，则自动确定宽高比（默认值："auto"）。 | COMBO  | 否    | `"auto"`<br />`"1:1"`<br />`"2:3"`<br />`"3:2"`<br />`"3:4"`<br />`"4:3"`<br />`"9:16"`<br />`"16:9"`<br />`"9:19.5"`<br />`"19.5:9"`<br />`"9:20"`<br />`"20:9"`<br />`"1:2"`<br />`"2:1"` |

**重要限制：**

* `image` 输入最多支持 3 张图像，但使用 `grok-imagine-image-pro` 模型时除外，该模型仅支持 1 张输入图像。
* 仅当多张图像连接到 `image` 输入时，`aspect_ratio` 参数才能设置为自定义值（非 "auto"）。如果单张输入图像设置了自定义宽高比，将会导致错误。

## 输出

| 输出名称     | 描述                                                 | 数据类型  |
| -------- | -------------------------------------------------- | ----- |
| `output` | 节点生成的编辑后图像。如果 `number_of_images` 大于 1，则输出将拼接为一个批次。 | IMAGE |

> 本文档由 AI 生成。如果您发现任何错误或有改进建议，欢迎贡献！ [在 GitHub 上编辑](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/GrokImageEditNode/zh.md)

***

**Source fingerprint (SHA-256):** `021d867e9e04451c0c4ef035c19fa86ebc8d4a3f64572aff33f493324d7fe308`
