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

# KlingVideoNode - ComfyUI Built-in Node Documentation

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

> 本文档由 AI 生成。如果您发现任何错误或有改进建议，欢迎贡献！ [在 GitHub 上编辑](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/KlingVideoNode/zh.md)

此节点使用 Kling V3 模型生成视频。它支持两种主要模式：文本到视频（根据文本描述创建视频）和图像到视频（对现有图像进行动画处理）。它还提供高级功能，例如创建具有不同片段提示和时长的多段视频（故事板），并可选择生成伴随音频。

## 输入参数

| 参数                   | 数据类型    | 必填 | 取值范围                                                                                                                                                  | 描述                                                                              |
| -------------------- | ------- | -- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| `multi_shot`         | COMBO   | 是  | `"disabled"`<br />`"1 storyboard"`<br />`"2 storyboards"`<br />`"3 storyboards"`<br />`"4 storyboards"`<br />`"5 storyboards"`<br />`"6 storyboards"` | 控制是生成单个视频，还是生成一系列具有独立提示和时长的片段。当不为 "disabled" 时，会显示每个故事板的提示和时长输入项。               |
| `generate_audio`     | BOOLEAN | 是  | `True` / `False`                                                                                                                                      | 启用后，节点将为视频生成音频。默认值为 `True`。                                                     |
| `model`              | COMBO   | 是  | `"kling-v3"`                                                                                                                                          | 模型及其相关设置。选择此选项会显示 `resolution` 和 `aspect_ratio` 子参数。                            |
| `model.resolution`   | COMBO   | 是  | `"1080p"`<br />`"720p"`                                                                                                                               | 生成视频的分辨率。当 `model` 设置为 "kling-v3" 时，此设置可用。                                      |
| `model.aspect_ratio` | COMBO   | 是  | `"16:9"`<br />`"9:16"`<br />`"1:1"`                                                                                                                   | 生成视频的宽高比。当为 `start_frame` 提供了图像（图像到视频模式）时，此设置将被忽略。在 `model` 设置为 "kling-v3" 时可用。 |
| `seed`               | INT     | 是  | 0 到 2147483647                                                                                                                                        | 生成的种子值。更改此值将导致节点重新运行，但结果是非确定性的。默认值为 `0`。                                        |
| `start_frame`        | IMAGE   | 否  | -                                                                                                                                                     | 可选的起始图像。当连接此输入时，节点将从文本到视频模式切换到图像到视频模式，对提供的图像进行动画处理。                             |

**`multi_shot` 模式下的输入：**

* 当 `multi_shot` 设置为 **"disabled"** 时，会出现以下输入：
  * `prompt` (STRING): 视频的主要文本描述。必填。长度必须在 1 到 2500 个字符之间。
  * `negative_prompt` (STRING): 描述视频中不应出现内容的文本。可选。
  * `duration` (INT): 视频时长（秒）。必须在 3 到 15 秒之间。默认值为 `5`。
* 当 `multi_shot` 设置为故事板选项（例如 `"3 storyboards"`）时，会出现每个故事板片段的输入（例如 `storyboard_1_prompt`、`storyboard_1_duration`）。每个提示的长度必须在 1 到 512 个字符之间。**所有故事板时长的总和**必须在 3 到 15 秒之间。

**约束条件：**

* 当 `start_frame` 未连接时，节点在**文本到视频**模式下运行。在此模式下，它使用 `model.aspect_ratio` 设置。
* 当 `start_frame` 连接时，节点在**图像到视频**模式下运行。`model.aspect_ratio` 设置将被忽略。输入图像必须至少为 300x300 像素，且宽高比在 1:2.5 到 2.5:1 之间。
* 在故事板模式下（`multi_shot` 不为 "disabled"），主 `prompt` 和 `negative_prompt` 输入将被隐藏且不被使用。

## 输出参数

| 输出名称    | 数据类型  | 描述       |
| ------- | ----- | -------- |
| `video` | VIDEO | 生成的视频文件。 |
