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

# MAGI-2 in ComfyUI: Text, Image, and Reference to Video

> Run MAGI-2 Partner Nodes in ComfyUI for 1080p video up to 30 seconds with native audio, from text, frames, or up to 20 mixed references.

MAGI-2 is Sand.ai's video model, available in ComfyUI as three Partner Nodes. Every run returns a 1080p clip of 4 to 30 seconds with native audio, so dialogue, foley, and score arrive with the picture.

## What MAGI-2 is good at

* **Instruction following**: crowded scenes, several subjects, and long shots keep the layout you describe
* **Native audio**: sound is generated in the same pass as the video, no separate audio step
* **First and last frame**: animate toward a chosen end frame, not only away from a start frame
* **Reference consistency**: hold a character, location, camera move, or voice across shots

> [!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](https://docs.comfy.org/tutorials/partner-nodes/overview.md) section of the documentation to understand the specific requirements for using the Partner Nodes.

> [!TIP]
>
> > [tab] Local users
> >
> > Make sure your ComfyUI is updated.
> >
> > * [Download ComfyUI](https://www.comfy.org/download)
> > * [Update Guide](https://docs.comfy.org/installation/update_comfyui.md)
> >
> > Workflows in this guide can be found in the [Workflow Templates](https://docs.comfy.org/interface/features/template.md).
> > 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] 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.

## Text to video

Generate a clip from a prompt alone.

![MAGI-2 text to video workflow](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/api_magi2_t2v-1.webp)

> [card] [Run on Comfy Cloud](https://cloud.comfy.org/?template=api_magi2_t2v\&utm_source=docs\&utm_medium=referral\&utm_campaign=magi-2)
>
> Open in Comfy Cloud

> [card] [Download Workflow](https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_magi2_t2v.json)
>
> Download JSON or search "MAGI-2: Text to Video" in Template Library

1. Write the prompt. Describe the scene, the action, and the sound you want
2. Set `duration` (4 to 30 seconds) and `aspect_ratio` (16:9, 9:16, 1:1, 4:3, 3:4, or 21:9)
3. Leave `generate_audio` on to get sound with the video
4. Click **Run**

Output resolution is 1080p. Changing the seed re-runs the node, but results vary even with the same seed.

## Image to video

Animate a first frame, optionally toward a last frame.

![MAGI-2 image to video workflow](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/api_magi2_i2v-1.webp)

> [card] [Run on Comfy Cloud](https://cloud.comfy.org/?template=api_magi2_i2v\&utm_source=docs\&utm_medium=referral\&utm_campaign=magi-2)
>
> Open in Comfy Cloud

> [card] [Download Workflow](https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_magi2_i2v.json)
>
> Download JSON or search "MAGI-2: Image to Video" in Template Library

> [card] [Download Sample Input Image](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/forest_rhino_ukiyoe.png)
>
> Get the example first frame for this workflow.

1. Load the first frame in the `first_frame` input. Connect `last_frame` only when you want a fixed end frame
2. Describe the motion in the prompt
3. Keep `aspect_ratio` on `auto` to match the first frame, or pick a ratio. MAGI-2 stretches frames to the ratio you choose
4. Click **Run**

## Reference to video

Guide the clip with reference media so characters, locations, camera moves, and voices stay consistent.

![MAGI-2 reference to video workflow](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/api_magi2_r2v-1.webp)

> [card] [Run on Comfy Cloud](https://cloud.comfy.org/?template=api_magi2_r2v\&utm_source=docs\&utm_medium=referral\&utm_campaign=magi-2)
>
> Open in Comfy Cloud

> [card] [Download Workflow](https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_magi2_r2v.json)
>
> Download JSON or search "MAGI-2: Reference to Video" in Template Library

> [card] [Download Sample Character Sheet](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/alien_scout_character_sheet.png)
>
> Character reference used by the example prompt.

> [card] [Download Sample Location Plate](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/alien_canyon_fog_plate.png)
>
> Location reference used by the example prompt.

1. Connect reference images, videos, or audio clips. The node accepts 10 images, 5 videos, and 5 audio clips
2. Refer to them in the prompt as `@Image1`, `@Video1`, and `@Audio1`. Numbering restarts per type and follows input order
3. Set `duration` and `aspect_ratio`, then click **Run**

References have limits: videos must be at least 2 seconds, each type is trimmed to 30 seconds in total, and audio shorter than 2 seconds is padded with silence.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.