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.
This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHub
Overview
Modify an existing image based on a text prompt. This node sends your images and a text description to the Grok API, which edits the images according to your instructions and returns the result.Inputs
| Parameter | Data Type | Required | Range | Description |
|---|---|---|---|---|
prompt | STRING | Yes | N/A | The text prompt used to generate the image. Must be at least 1 character long after stripping whitespace. |
model | MODEL | Yes | See Description | The Grok image model to use. This parameter has multiple sub-options that appear after selecting a model. Available models: grok-imagine-image-qualitygrok-imagine-image-progrok-imagine-image. Each model has different capabilities (see note below). |
seed | INT | Yes | 0 to 2147483647 | Seed to determine if node should re-run; actual results are nondeterministic regardless of seed. (default: 0) |
model parameter constraints:
- The
modelparameter is a dynamic combo that includes sub-options forresolution,number_of_images,images, andaspect_ratio. grok-imagine-image-quality: Supports up to 3 input images and allows custom aspect ratio.grok-imagine-image-pro: Supports only 1 input image and does not allow custom aspect ratio.grok-imagine-image: Supports up to 3 input images and allows custom aspect ratio.- At least one input image is required for editing. The node will raise an error if no images are provided.
- Custom aspect ratio (
aspect_ratiosub-option) is only allowed when multiple images are connected to the image input. If only one image is provided, aspect ratio must be set to “auto”.
Outputs
| Output Name | Data Type | Description |
|---|---|---|
IMAGE | IMAGE | The edited image(s) returned by the Grok API. If a single image is generated, it is returned directly. If multiple images are generated, they are concatenated into a single batch tensor. |
Source fingerprint (SHA-256):
90ace53f5f2e40da315d4940fa801d84950de6db2d8ed1cf9d715d88a2b1ebf0