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

# Pruna P-Video-2 Pro Reference to Video - ComfyUI Built-in Node Documentation

> Generate a video from a prompt guided by reference images, videos and audio with Pruna P-Video-2 Pro Reference to Video.

Generate a video from a prompt guided by reference images, videos and audio with Pruna P-Video-2 Pro Reference to Video. Refer to each reference by number in the prompt and the model carries its subject, style or motion into the result.

## Inputs

| Parameter | Description | Data Type | Required | Range |
| - | - | - | - | - |
| `model` | Pruna video model to use. Selecting a model reveals its inputs below. | DYNAMIC\_COMBO | Yes | `"p-video-2-pro-reference"` |

### P-Video-2 Pro Reference Inputs

| Parameter | Description | Data Type | Required | Range |
| - | - | - | - | - |
| `model.images` | Growable slot for reference images (`image_1`, `image_2`, ...), referred to in the prompt as `@Image1` to `@Image9` in connection order. Up to 9 images, counting the first and last frames. | AUTOGROW | No | 0 to 9 images |
| `model.videos` | Growable slot for reference videos (`video_1`, `video_2`, ...), referred to as `@Video1` to `@Video3`. Each 2 to 15 seconds at up to 60 fps, 15 seconds in total. Videos above 1080p are downscaled. | AUTOGROW | No | 0 to 3 videos |
| `model.audios` | Growable slot for reference audio (`audio_1`, `audio_2`, ...), referred to as `@Audio1` to `@Audio3`. Up to 15 seconds in total. | AUTOGROW | No | 0 to 3 audio clips |
| `model.prompt` | Describes the video. Refer to the references as `@Image1`, `@Video1` or `@Audio1` (default: empty). Up to 5000 characters. | STRING | Yes | 1 to 5000 characters |
| `model.first_frame` | Image the video starts from. Counts toward the 9-image limit. | IMAGE | No | - |
| `model.last_frame` | Image the video ends on. Counts toward the 9-image limit. | IMAGE | No | - |
| `model.keep_audio` | Use the connected audio as the soundtrack and generate the video to match it (default: False). Needs exactly one audio: shorter audio is followed by generated sound, longer audio is cut to the duration. | BOOLEAN | Yes | `True` `False` |
| `model.duration` | Length of the video in seconds (default: `"5"`). | COMBO | Yes | `"5"` `"6"` `"7"` `"8"` `"9"` `"10"` `"11"` `"12"` `"13"` `"14"` |
| `model.resolution` | Output resolution (default: `"768p"`). 1080p, 2k and 4k upscale the generated 768p video. | COMBO | Yes | `"480p"` `"768p"` `"1080p"` `"2k"` `"4k"` |
| `model.mode` | `"cost"` is cheaper, `"speed"` renders faster (default: `"speed"`). | COMBO | Yes | `"cost"` `"speed"` |
| `model.aspect_ratio` | Aspect ratio of the output video (default: `"16:9"`). `"adaptive"` uses the most common ratio among the references, and with `enhance_prompt` on the rewritten prompt picks the ratio instead. | COMBO | Yes | `"adaptive"` `"16:9"` `"9:16"` `"4:3"` `"3:4"` `"3:2"` `"2:3"` `"1:1"` |
| `model.enhance_prompt` | Rewrite the prompt with more detail before generation; `"max"` is slower (default: `"turbo"`). Keep it on when the prompt refers to references by number; a first or last frame always uses `"turbo"`. Advanced setting. | COMBO | Yes | `"off"` `"turbo"` `"max"` |
| `model.seed` | Seed for the generation (default: 42). The same seed reproduces a result exactly only when `model.enhance_prompt` is off. | INT | Yes | 0 to 2147483647 Step: 1 |

**Notes:**

* Connect at least one reference image, video, first frame or last frame, otherwise the node stops with an error.
* 9 images are allowed including the first and last frames, and 12 references in total across images, frames, videos and audio.
* Reference video and reference audio are each limited to 15 seconds in total, and every single reference video must be 2 to 15 seconds long at up to 60 fps.

## Outputs

| Output Name | Description | Data Type |
| - | - | - |
| `video` | The generated video. | VIDEO |

> 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/PrunaReferenceToVideoNode/en.md)

***

**Source fingerprint (SHA-256):** `d6e295b394984c924386ea6432532c7653b4512c646b1f86793be9b98583eef3`


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