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

# MiniMaxH3ReferenceToVideo - ComfyUI Built-in Node Documentation

> Complete documentation for the MiniMaxH3ReferenceToVideo node in ComfyUI. Learn its inputs, outputs, parameters and usage.

MiniMax H3 Reference to Video creates the text conditioning and the empty video latent needed for MiniMax H3 reference-to-video generation. You provide a prompt plus optional reference images, videos, and audio clips, and the node encodes these references into tokens the model can use while generating. The prompt refers to the references with `&lt;Picture i>`, `&lt;Video k>`, and `&lt;Audio j>` tags.

## Inputs

| Parameter          | Description                                                                                                                                                                                                                                                                                                                         | Data Type | Required | Range                  |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -------- | ---------------------- |
| `clip`             | CLIP model used to tokenize the prompt and encode the reference media into conditioning tokens.                                                                                                                                                                                                                                     | CLIP      | Yes      |                        |
| `vae`              | VAE used to encode reference images and reference video frames into latent space.                                                                                                                                                                                                                                                   | VAE       | Yes      |                        |
| `audio_vae`        | VAE used to encode reference audio into latent space (32 kHz audio sample rate).                                                                                                                                                                                                                                                    | VAE       | Yes      |                        |
| `prompt`           | Text prompt for the video. Reference media can be addressed with `&lt;Picture i>`, `&lt;Video k>`, and `&lt;Audio j>` tags (1-based per type). Supports multiline and dynamic prompts.                                                                                                                                              | STRING    | Yes      |                        |
| `width`            | Width of the generated video in pixels (default: 1344).                                                                                                                                                                                                                                                                             | INT       | Yes      | 32 to 16384 (step 32)  |
| `height`           | Height of the generated video in pixels (default: 768).                                                                                                                                                                                                                                                                             | INT       | Yes      | 32 to 16384 (step 32)  |
| `length`           | Frame count at 24 fps; 124 = \~5s, trained range is \~124-362 (default: 124).                                                                                                                                                                                                                                                       | INT       | Yes      | 5 to 3600 (step 17)    |
| `ref_image_size`   | Reference image sizing mode. `match` scales each reference image down only, keeping the aspect ratio, to the generation's pixel area; `max` uses the reference pipeline's 2048px short edge for best identity fidelity. Reference tokens ride through every sampling step, so `max` can be several times slower (default: `match`). | COMBO     | Yes      | `"match"`<br />`"max"` |
| `ref_images`       | Optional reference images. Each image is downscaled to a 2048px short edge if larger and never upscaled. Multiple images can be provided.                                                                                                                                                                                           | IMAGE     | No       | 0 to 9                 |
| `ref_videos`       | Optional reference video frames at 24 fps (2-15s). Multiple videos can be provided.                                                                                                                                                                                                                                                 | IMAGE     | No       | 0 to 3                 |
| `ref_video_audios` | Optional soundtracks paired with reference videos by index; `ref_video_audio_N` is the soundtrack of the same-numbered `ref_video_N`.                                                                                                                                                                                               | AUDIO     | No       | 0 to 3                 |
| `ref_audios`       | Optional standalone reference audio clips.                                                                                                                                                                                                                                                                                          | AUDIO     | No       | 0 to 3                 |

Notes:

* The prompt refers to reference media with 1-based tags per type: `&lt;Picture i>` for images, `&lt;Video k>` for videos, and `&lt;Audio j>` for audio. References are presented to the model in a fixed order: images, then videos (with each soundtrack's `&lt;Audio j>` label right before its `&lt;Video k>`), then standalone audio.
* Reference videos must contain at least 5 frames (\~0.2 seconds at 24 fps), otherwise the node raises an error. Video frames are also capped to the selected `length` and trimmed to a supported frame count.

## Outputs

| Output Name | Description                                                                                                                                 | Data Type    |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| `positive`  | Conditioning containing the encoded prompt together with the encoded reference image, video, and audio tokens used by the MiniMax H3 model. | CONDITIONING |
| `latent`    | Empty audio-video latent at the requested `width`, `height`, and `length` (frame count).                                                    | LATENT       |

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/MiniMaxH3ReferenceToVideo/en.md)

***

**Source fingerprint (SHA-256):** `529e51c5c9c63a94176a15851f40ac42f7bd93e7d7c6ad334ed22aa29d04dfde`
