Skip to main content

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

ParameterData TypeRequiredRangeDescription
promptSTRINGYesN/AThe text prompt used to generate the image. Must be at least 1 character long after stripping whitespace.
modelMODELYesSee DescriptionThe Grok image model to use. This parameter has multiple sub-options that appear after selecting a model. Available models: grok-imagine-image-quality
grok-imagine-image-pro
grok-imagine-image. Each model has different capabilities (see note below).
seedINTYes0 to 2147483647Seed to determine if node should re-run; actual results are nondeterministic regardless of seed. (default: 0)
Note on model parameter constraints:
  • The model parameter is a dynamic combo that includes sub-options for resolution, number_of_images, images, and aspect_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_ratio sub-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 NameData TypeDescription
IMAGEIMAGEThe 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