> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-docs-router-model-page-pilot.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ByteDance2FirstLastFrameNode - ComfyUI Built-in Node Documentation

> This node generates a video from a required first frame image and an optional last frame image using ByteDance Seedance models.

This node generates a video from a required first frame image and an optional last frame image using ByteDance Seedance models. You describe the video with a text prompt; the first frame guides the start of the video and the last frame guides the end. It supports Seedance 2.5 and the Seedance 2.0 family (Seedance 2.0, Seedance 2.0 Fast, and Seedance 2.0 Mini).

## Inputs

### Common Inputs

| Parameter              | Description                                                                                                                                                                                                                                               | Data Type      | Required | Range                                                                                        |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | -------- | -------------------------------------------------------------------------------------------- |
| `model`                | Seedance 2.5 for the newest model, videos up to 30 seconds and mp4/mov output; Seedance 2.0 for maximum quality and 4k; Fast for speed optimization; Mini for the fastest, lowest-cost generation. Selecting a model reveals model-specific inputs below. | DYNAMIC\_COMBO | Yes      | `"Seedance 2.5"`<br />`"Seedance 2.0"`<br />`"Seedance 2.0 Fast"`<br />`"Seedance 2.0 Mini"` |
| `first_frame`          | First frame image for the video.                                                                                                                                                                                                                          | IMAGE          | No       | -                                                                                            |
| `last_frame`           | Last frame image for the video.                                                                                                                                                                                                                           | IMAGE          | No       | -                                                                                            |
| `first_frame_asset_id` | Seedance asset\_id to use as the first frame. Mutually exclusive with the `first_frame` image input. Default is an empty string.                                                                                                                          | STRING         | No       | -                                                                                            |
| `last_frame_asset_id`  | Seedance asset\_id to use as the last frame. Mutually exclusive with the `last_frame` image input. Default is an empty string.                                                                                                                            | STRING         | No       | -                                                                                            |
| `seed`                 | Seed controls whether the node should re-run; results are non-deterministic regardless of seed. Default is 0.                                                                                                                                             | INT            | Yes      | 0 to 2147483647                                                                              |
| `watermark`            | Whether to add a watermark to the video. Default is False.                                                                                                                                                                                                | BOOLEAN        | Yes      | False<br />True                                                                              |

### Seedance 2.5 Inputs

These inputs appear when `Seedance 2.5` is selected.

| Parameter        | Description                                                                                          | Data Type | Required | Range                                 |
| ---------------- | ---------------------------------------------------------------------------------------------------- | --------- | -------- | ------------------------------------- |
| `prompt`         | Text prompt for video generation. Put spoken lines in double quotes to steer the generated dialogue. | STRING    | Yes      | -                                     |
| `resolution`     | Resolution of the output video. Default is 720p.                                                     | COMBO     | Yes      | `"480p"`<br />`"720p"`<br />`"1080p"` |
| `duration`       | Duration of the output video in seconds (4-30). Default is 5.                                        | INT       | Yes      | 4 to 30                               |
| `generate_audio` | Enable audio generation for the output video. Default is True.                                       | BOOLEAN   | Yes      | False<br />True                       |
| `output_format`  | Container format of the output video. Default is mp4.                                                | COMBO     | Yes      | `"mp4"`                               |

### Seedance 2.0 Inputs

These inputs appear when `Seedance 2.0` is selected.

| Parameter        | Description                                                                                                                        | Data Type | Required | Range                                                                                         |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------- | --------- | -------- | --------------------------------------------------------------------------------------------- |
| `prompt`         | Text prompt for video generation.                                                                                                  | STRING    | Yes      | -                                                                                             |
| `resolution`     | Resolution of the output video.                                                                                                    | COMBO     | Yes      | `"480p"`<br />`"720p"`<br />`"1080p"`<br />`"4k"`                                             |
| `ratio`          | Aspect ratio of the output video. Default is `adaptive`, which uses the nearest supported ratio to the input frame's aspect ratio. | COMBO     | Yes      | `"16:9"`<br />`"4:3"`<br />`"1:1"`<br />`"3:4"`<br />`"9:16"`<br />`"21:9"`<br />`"adaptive"` |
| `duration`       | Duration of the output video in seconds (4-15). Default is 7.                                                                      | INT       | Yes      | 4 to 15                                                                                       |
| `generate_audio` | Enable audio generation for the output video. Default is True.                                                                     | BOOLEAN   | Yes      | False<br />True                                                                               |

### Seedance 2.0 Fast and Seedance 2.0 Mini Inputs

Shared by `Seedance 2.0 Fast` and `Seedance 2.0 Mini`.

| Parameter        | Description                                                                                                                        | Data Type | Required | Range                                                                                         |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------- | --------- | -------- | --------------------------------------------------------------------------------------------- |
| `prompt`         | Text prompt for video generation.                                                                                                  | STRING    | Yes      | -                                                                                             |
| `resolution`     | Resolution of the output video.                                                                                                    | COMBO     | Yes      | `"480p"`<br />`"720p"`                                                                        |
| `ratio`          | Aspect ratio of the output video. Default is `adaptive`, which uses the nearest supported ratio to the input frame's aspect ratio. | COMBO     | Yes      | `"16:9"`<br />`"4:3"`<br />`"1:1"`<br />`"3:4"`<br />`"9:16"`<br />`"21:9"`<br />`"adaptive"` |
| `duration`       | Duration of the output video in seconds (4-15). Default is 7.                                                                      | INT       | Yes      | 4 to 15                                                                                       |
| `generate_audio` | Enable audio generation for the output video. Default is True.                                                                     | BOOLEAN   | Yes      | False<br />True                                                                               |

**Parameter Constraints**

* You must provide the first frame either as a `first_frame` image or as a `first_frame_asset_id`. Providing both raises an error; providing neither also raises an error.
* The `last_frame` and `last_frame_asset_id` inputs are optional, but you cannot provide both for the same frame.
* Asset IDs must reference existing, active Seedance Image assets.
* The `prompt` input is required and cannot be empty.
* With `Seedance 2.5`, the output aspect ratio is always adaptive and follows the first frame's own aspect ratio, so no `ratio` input is shown.
* With Seedance 2.0 family models and local frame images, the images are center-cropped and resized to the target output resolution and ratio before generation. When `ratio` is `adaptive`, the nearest supported ratio to the input image is used.
* Local frame images are validated for supported aspect ratio and dimensions; oversized images are downscaled.

## Outputs

| Output Name | Description          | Data Type |
| ----------- | -------------------- | --------- |
| `output`    | 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/ByteDance2FirstLastFrameNode/en.md)

***

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