> ## 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.

# GrokImageEditNode - ComfyUI Built-in Node Documentation

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

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/GrokImageEditNode/en.md)

The Grok Image Edit node modifies an existing image based on a text prompt. It uses the Grok API to generate one or more new images that are variations of the input, guided by your description.

## Inputs

| Parameter          | Data Type | Required | Range                                                                                                                                                                                       | Description                                                                                                                                                                                  |
| ------------------ | --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `model`            | COMBO     | Yes      | `"grok-imagine-image-quality"`<br />`"grok-imagine-image-pro"`<br />`"grok-imagine-image"`<br />`"grok-imagine-image-beta"`                                                                 | The specific AI model to use for image editing.                                                                                                                                              |
| `image`            | IMAGE     | Yes      |                                                                                                                                                                                             | The input image(s) to be edited. Supports up to 3 input images, except for the "pro" model which supports only 1.                                                                            |
| `prompt`           | STRING    | Yes      |                                                                                                                                                                                             | The text prompt used to generate the edited image. Must be at least 1 character after stripping whitespace.                                                                                  |
| `resolution`       | COMBO     | Yes      | `"1K"`<br />`"2K"`                                                                                                                                                                          | The resolution for the output image.                                                                                                                                                         |
| `number_of_images` | INT       | No       | 1 to 10                                                                                                                                                                                     | Number of edited images to generate (default: 1).                                                                                                                                            |
| `seed`             | INT       | No       | 0 to 2147483647                                                                                                                                                                             | Seed to determine if node should re-run; actual results are nondeterministic regardless of seed (default: 0).                                                                                |
| `aspect_ratio`     | COMBO     | No       | `"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"` | The aspect ratio for the output image. Only allowed when multiple images are connected to the image input. If set to "auto", the aspect ratio is determined automatically (default: "auto"). |

**Important constraints:**

* The `image` input supports up to 3 images, except when using the `grok-imagine-image-pro` model, which supports only 1 input image.
* The `aspect_ratio` parameter can only be set to a custom value (not "auto") when multiple images are connected to the `image` input. Setting a custom aspect ratio with a single input image will cause an error.

## Outputs

| Output Name | Data Type | Description                                                                                                                    |
| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `output`    | IMAGE     | The edited image(s) generated by the node. If `number_of_images` is greater than 1, the outputs are concatenated into a batch. |

***

**Source fingerprint (SHA-256):** `31cfe7ad382033f69330ed4de1ec831ccc25156498563e1541368e2662ed3ddb`
