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

# Wan2VideoEditApi - ComfyUI Built-in Node Documentation

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

Wan2VideoEditApi 节点使用 Wan 2.7 模型，根据文本指令、参考图像或风格迁移来编辑视频。它会处理输入视频，并根据指定的参数（如分辨率、时长和宽高比）生成新视频。

## 输入

| 参数                       | 说明                                                         | 数据类型    | 是否必填 | 取值范围                                                                                                         |
| ------------------------ | ---------------------------------------------------------- | ------- | ---- | ------------------------------------------------------------------------------------------------------------ |
| `model`                  | 用于视频编辑的模型。                                                 | COMBO   | 是    | `"wan2.7-videoedit"`                                                                                         |
| `model.prompt`           | 编辑指令或风格迁移要求。（默认值：空字符串）                                     | STRING  | 是    | -                                                                                                            |
| `model.resolution`       | 输出视频的分辨率。                                                  | COMBO   | 是    | `"720P"`<br />`"1080P"`                                                                                      |
| `model.ratio`            | 输出视频的宽高比。若未更改，则近似于输入视频的宽高比。                                | COMBO   | 是    | `"16:9"`<br />`"9:16"`<br />`"1:1"`<br />`"4:3"`<br />`"3:4"`                                                |
| `model.duration`         | 输出时长（秒）。'auto' 表示与输入视频时长一致。指定具体数值将从视频开头截取相应时长。（默认值："auto"） | COMBO   | 是    | `"auto"`<br />`"2"`<br />`"3"`<br />`"4"`<br />`"5"`<br />`"6"`<br />`"7"`<br />`"8"`<br />`"9"`<br />`"10"` |
| `model.reference_images` | 最多 4 张参考图像列表，用于指导编辑。                                       | IMAGE   | 否    | -                                                                                                            |
| `video`                  | 待编辑的视频。                                                    | VIDEO   | 是    | -                                                                                                            |
| `seed`                   | 用于生成的随机种子。（默认值：0）                                          | INT     | 否    | 0 到 2147483647                                                                                               |
| `audio_setting`          | 'auto'：模型根据提示词决定是否重新生成音频。'origin'：保留输入视频的原始音频。（默认值："auto"） | COMBO   | 否    | `"auto"`<br />`"origin"`                                                                                     |
| `watermark`              | 是否在结果中添加 AI 生成水印。（默认值：False）                               | BOOLEAN | 否    | -                                                                                                            |

**约束条件：**

* `model.prompt` 长度必须至少为 1 个字符。
* 输入 `video` 的时长必须在 2 到 10 秒之间。
* `model.reference_images` 输入最多可接受 4 张图像。

## 输出

| 输出名称     | 说明          | 数据类型  |
| -------- | ----------- | ----- |
| `output` | 模型生成的编辑后视频。 | VIDEO |

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

***

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