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

# Grok Imagine Image in ComfyUI: AI Image Generation and Editing

> Generate and edit images with the Grok Imagine Image model in ComfyUI: text-to-image and natural-language image editing

Grok Image is xAI's image generation model, available in ComfyUI through the Grok partner nodes. It generates images from text prompts and edits uploaded images with natural-language instructions, supporting 13 aspect ratios and 1K or 2K output.

<Tip>
  To use the Partner Nodes, you need to ensure that you are logged in properly and using a permitted network environment. Please refer to the [Partner Nodes Overview](/tutorials/partner-nodes/overview) section of the documentation to understand the specific requirements for using the Partner Nodes.
</Tip>

<Tip>
  <Tabs>
    <Tab title="Local users">
      Make sure your ComfyUI is updated.

      * [Download ComfyUI](https://www.comfy.org/download)
      * [Update Guide](/installation/update_comfyui)

      Workflows in this guide can be found in the [Workflow Templates](/interface/features/template).
      If you can't find them in the template, your ComfyUI may be outdated.

      If nodes are missing when loading a workflow, possible reasons:

      1. You are not using the latest ComfyUI version (Nightly version)
      2. Some nodes failed to import at startup
    </Tab>

    <Tab title="Cloud users">
      * [Cloud](https://cloud.comfy.org) will update after ComfyUI stable release.

      So, if you find any core node missing in this document, it might be because the new core nodes have not yet been released in the latest stable version. Please wait for the next stable release.
    </Tab>
  </Tabs>
</Tip>

## Grok: Text to Image

Generate images from a text prompt with the standard `grok-imagine-image` model. This workflow is the fastest way to create single images in ComfyUI with Grok, supporting 13 aspect ratios and 1K or 2K output.

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/api_grok_text_to_image-1.webp" alt="Grok text-to-image workflow preview" />

<CardGroup cols={2}>
  <Card title="Run on Comfy Cloud" icon="cloud" href="https://cloud.comfy.org/?template=api_grok_text_to_image&utm_source=docs&utm_medium=referral&utm_campaign=grok-image">
    Open in Comfy Cloud
  </Card>

  <Card title="Download Workflow" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_grok_text_to_image.json">
    Download JSON or search "Grok Imagine" in Template Library
  </Card>
</CardGroup>

![Grok text-to-image output](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/api_grok_text_to_image.png)

### Workflow overview

This workflow uses two nodes:

* **GrokImageNode**: the core node, configured with the `grok-imagine-image` model
* **SaveImage**: saves the generated image

### Steps to run

1. **Enter your prompt**: describe the scene and style in the **GrokImageNode**
2. **Choose aspect ratio**: pick from ratios such as `1:1`, `16:9`, `9:16`, and more
3. **Set resolution**: `1K` or `2K`
4. **Click Queue**: press `Ctrl+Enter` to generate

## Grok: Image Edit

Edit an uploaded image with natural-language instructions. This workflow keeps the original composition and changes the scene, lighting, or style based on your prompt.

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/api_grok_image_edit-1.webp" alt="Grok image edit workflow preview" />

<CardGroup cols={2}>
  <Card title="Run on Comfy Cloud" icon="cloud" href="https://cloud.comfy.org/?template=api_grok_image_edit&utm_source=docs&utm_medium=referral&utm_campaign=grok-image">
    Open in Comfy Cloud
  </Card>

  <Card title="Download Workflow" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_grok_image_edit.json">
    Download JSON or search "Grok Imagine" in Template Library
  </Card>
</CardGroup>

<details className="prose" style={{marginBottom:"1rem"}}>
  <summary>Input materials</summary>

  Download this sample input image to try the workflow:

  <CardGroup cols={1}>
    <Card title="Input image: cyberpunk_robot.png" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/cyberpunk_robot.png">
      A robot design used as the base image for editing
    </Card>
  </CardGroup>
</details>

![Grok image edit output](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/api_grok_image_edit.png)

### Workflow overview

This workflow uses three nodes:

* **LoadImage**: provides the source image to edit
* **GrokImageEditNode**: the core node, configured with the `grok-imagine-image` model
* **SaveImage**: saves the edited image

### Steps to run

1. **Load an image**: connect your image to the **LoadImage** node
2. **Describe the edit**: tell the model what to change in the **GrokImageEditNode** prompt
3. **Click Queue**: press `Ctrl+Enter` to generate
