> ## 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 Video in ComfyUI: AI Video Generation, Editing, and Extension

> Generate, edit, and extend videos with Grok Imagine in ComfyUI: text/image to video, video editing, video extension, and reference-to-video workflows

Grok Imagine Video is xAI's video generation family, available in ComfyUI through the Grok partner nodes. It covers video generation from text or an image, video editing, seamless video extension, and reference-to-video generation guided by character or style images.

For the latest model, see [Grok Imagine Video 1.5](/tutorials/partner-nodes/grok/grok-imagine-video-1-5).

<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: Video Generation

Generate a short video from a text prompt, with an optional starting image. This workflow uses the `grok-imagine-video` model to produce up to 15-second clips with synchronized audio.

<video controls className="w-full aspect-video" src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/api_grok_video.mp4" />

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

  <Card title="Download Workflow" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_grok_video.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: sci-fi_mech.png" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/sci-fi_mech.png">
      A sci-fi mech suit used as the optional starting frame
    </Card>
  </CardGroup>
</details>

### Workflow overview

This workflow uses three nodes:

* **LoadImage**: provides the optional starting image frame
* **GrokVideoNode**: the core node, configured with the `grok-imagine-video` model
* **SaveVideo**: saves the generated video with audio

### Steps to run

1. **Enter your prompt**: describe the motion, atmosphere, and scene dynamics in the **GrokVideoNode**
2. **Optionally load a starting image**: connect an image to the **LoadImage** node
3. **Set resolution**: `480p` or `720p`
4. **Set duration**: choose a length from 1 to 15 seconds
5. **Set seed**: control whether the node re-runs; outputs are not reproducible regardless of seed
6. **Click Queue**: press `Ctrl+Enter` to generate

## Grok: Video Edit

Edit an uploaded video with natural-language instructions. Restyle the footage, change the setting, or apply a new aesthetic while keeping the original motion and content.

<video controls className="w-full aspect-video" src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/api_grok_video_edit.mp4" />

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

  <Card title="Download Workflow" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_grok_video_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 video to try the workflow:

  <CardGroup cols={1}>
    <Card title="Input video: futuristic_motorcycle.mp4" icon="video" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/futuristic_motorcycle.mp4">
      A futuristic motorcycle clip used as the base video
    </Card>
  </CardGroup>
</details>

### Workflow overview

This workflow uses three nodes:

* **LoadVideo**: provides the source video to edit
* **GrokVideoEditNode**: the core node, configured with the `grok-imagine-video` model
* **SaveVideo**: saves the edited video

### Steps to run

1. **Load a video**: connect your video to the **LoadVideo** node (1 to 8.7 seconds, up to 50MB)
2. **Describe the edit**: tell the model how to transform the footage in the **GrokVideoEditNode** prompt
3. **Click Queue**: press `Ctrl+Enter` to generate

## Grok: Video Extend

Extend a short video with a seamless continuation. Describe the next scene in natural language, and the model generates a new clip that follows on from the original footage.

<video controls className="w-full aspect-video" src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/api_grok_video_extend.mp4" />

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

  <Card title="Download Workflow" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_grok_video_extend.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 video to try the workflow:

  <CardGroup cols={1}>
    <Card title="Input video: deep_space_nexus.mp4" icon="video" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/deep_space_nexus.mp4">
      A short deep-space clip used as the base video
    </Card>
  </CardGroup>
</details>

### Workflow overview

This workflow uses three nodes:

* **LoadVideo**: provides the source video to extend
* **GrokVideoExtendNode**: the core node, configured with the `grok-imagine-video` model
* **SaveVideo**: saves the extended video

### Steps to run

1. **Load a video**: connect your video to the **LoadVideo** node (MP4, 2 to 15 seconds, up to 50MB)
2. **Describe the next scene**: tell the model what should happen next in the **GrokVideoExtendNode** prompt
3. **Set duration**: choose the extension length (2 to 10 seconds)
4. **Click Queue**: press `Ctrl+Enter` to generate

## Grok: Reference to Video

Generate a video guided by up to 7 reference images. Use character, product, or style references to keep the subject consistent while the prompt describes the motion and scene.

<video controls className="w-full aspect-video" src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/api_grok_reference_to_video.mp4" />

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

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

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

  Download these sample input images to try the workflow:

  <CardGroup cols={2}>
    <Card title="Character reference: quiet_girl.png" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/quiet_girl.png">
      A calm female character used as the subject reference
    </Card>

    <Card title="Object reference: phone.png" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/phone.png">
      A smartphone used as the object reference
    </Card>
  </CardGroup>
</details>

### Workflow overview

This workflow uses four nodes:

* **LoadImage** x2: provide the character and object reference images
* **GrokVideoReferenceNode**: the core node, configured with the `grok-imagine-video` model and reference images
* **SaveVideo**: saves the generated video

### Steps to run

1. **Load your references**: connect up to 7 reference images to the **LoadImage** nodes
2. **Enter your prompt**: describe the scene, motion, and how the references appear in the **GrokVideoReferenceNode**
3. **Set resolution**: `480p` or `720p`
4. **Set aspect ratio**: pick from `16:9` down to `9:16`
5. **Set duration**: choose a length from 2 to 10 seconds
6. **Click Queue**: press `Ctrl+Enter` to generate
