> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-matt-router-pricing-pika-and-guard.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Wan22FunControlToVideo - ComfyUI Built-in Node Documentation

> Wan22FunControlToVideo 节点为使用 Wan 视频模型进行视频生成准备 conditioning 数据和空 latent 张量。

Wan22FunControlToVideo 节点为使用 Wan 视频模型进行视频生成准备 conditioning 数据和空 latent 张量。它会将可选的参考图像和控制视频编码到 latent 空间，将它们附加到正向和负向 conditioning，并创建具有与所请求视频对应的正确空间和时间维度的零填充 latent 张量。

## 输入

| 参数 | 描述 | 数据类型 | 必需 | 范围 |
| - | - | - | - | - |
| `正面提示词` | 用于引导视频生成的正向 conditioning 输入 | CONDITIONING | 是 | - |
| `负面提示词` | 用于引导视频生成的负向 conditioning 输入 | CONDITIONING | 是 | - |
| `VAE` | 用于将图像编码到 latent 空间的 VAE 模型 | VAE | 是 | - |
| `宽度` | 输出视频的宽度（像素）（默认值：832，步长：16） | INT | 是 | 16 to MAX\_RESOLUTION |
| `高度` | 输出视频的高度（像素）（默认值：480，步长：16） | INT | 是 | 16 to MAX\_RESOLUTION |
| `长度` | 视频序列中的帧数（默认值：81，步长：4） | INT | 是 | 1 to MAX\_RESOLUTION |
| `批次大小` | 要生成的视频序列数量（默认值：1） | INT | 是 | 1 到 4096 |
| `参考图像` | 可选的参考图像，为生成提供视觉引导 | IMAGE | 否 | - |
| `控制视频` | 可选的控制视频，用于引导生成过程 | IMAGE | 否 | - |

**注意：** `length` 参数按 4 帧为步长进行处理，节点在构建 latent 空间时会自动应用时间缩放。提供 `ref_image` 时，仅编码其第一帧（调整为 `width` x `height`），并作为参考 latent 附加到 conditioning。提供 `control_video` 时，会将其裁剪为 `length` 帧、调整大小、编码，并放入 conditioning 使用的拼接 latent 中。拼接后的 latent 会沿通道维度复制，其通道布局取决于 VAE 的 latent 通道数（48 通道使用 Wan 2.2 格式，否则使用 Wan 2.1 格式）。`start_image` 参数在执行逻辑中被引用，但未暴露在节点的输入 schema 中，因此无法从节点界面进行设置。

## 输出

| 输出名称 | 描述 | 数据类型 |
| - | - | - |
| `positive` | 添加了视频特定 latent 数据的正向 conditioning，包括拼接 latent、mask 和可选的参考 latent | CONDITIONING |
| `negative` | 添加了视频特定 latent 数据的负向 conditioning，包括拼接 latent、mask 和可选的参考 latent | CONDITIONING |
| `latent` | 为视频生成准备的空 latent 张量，其大小根据批量大小、latent 通道数、`length`、`height` 和 `width` 确定 | LATENT |

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

***

**Source fingerprint (SHA-256):** `731b848f15c13ddc662f19230acb55d195f934bad7d9ae516a288e0ed8f8d899`


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