> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# Wan22FunControl视频（Wan22FunControlToVideo）

<div class="node-meta"><code>Wan22FunControlToVideo</code><span>model/conditioning/wan/fun control</span><span>角色：图像编码</span></div>

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

## 参数

| 参数                  | 类型                | 默认 / 范围           | 说明                                                               |
| ------------------- | ----------------- | ----------------- | ---------------------------------------------------------------- |
| `positive`          | CONDITIONING · 条件 | —（连线输入）           | 添加了视频特定 latent 数据的正向 conditioning，包括拼接 latent、mask 和可选的参考 latent |
| `negative`          | CONDITIONING · 条件 | —（连线输入）           | 添加了视频特定 latent 数据的负向 conditioning，包括拼接 latent、mask 和可选的参考 latent |
| `vae`               | VAE · 自编码器        | —（连线输入）           | 用于将图像编码到 latent 空间的 VAE 模型                                       |
| `width`             | INT               | 16 \~ 16384，步长 16 | 像素。必须为 8 的倍数（SD1.5 512、SDXL 1024、Flux 1024）。                     |
| `height`            | INT               | 16 \~ 16384，步长 16 | 像素。必须为 8 的倍数，非正方形建议保持总像素与原模型训练分辨率一致。                             |
| `length`            | INT               | 1 \~ 16384，步长 4   | 视频模型生成的总帧数，需满足模型帧数约束（如 4n+1）。                                    |
| `batch_size`        | INT               | 1 \~ 4096         | 一次生成的图片数量，显存占用线性增长。                                              |
| `ref_image`（选填）     | IMAGE · 图像        | —（连线输入）           | —                                                                |
| `control_video`（选填） | IMAGE · 图像        | —（连线输入）           | —                                                                |

## 输出

| 输出       | 类型           | 说明  |
| -------- | ------------ | --- |
| positive | CONDITIONING | 条件  |
| negative | CONDITIONING | 条件  |
| latent   | LATENT       | 潜空间 |

## 怎么接

- **上游**：CLIPTextEncode / 条件节点
- **下游**：KSampler.positive / negative
- **接线**：把 LoadImage / VAEDecode 出来的 IMAGE 接到 `image`，同家族 VAE 接到 `vae`；输出 LATENT 送进 KSampler 的 `latent_image`——配合 0.4-0.7 的降噪强度就是图生图，先接 SetLatentNoiseMask 则变成局部重绘。

## 使用案例

属于「图像编码」类节点，向下游提供条件，最终进采样器的 positive 或 negative。从 `positive`、`negative`、`vae` 开始填就能跑起来。典型接法：`CLIPTextEncode` → 本节点 → `KSampler.positive`。注意：宽高必须是 8 的倍数；SDXL 建议总像素约 1024²，Flux 建议 1MP 左右。

## 端口与连线示意

![Wan22FunControlToVideo 端口与连线示意](/svg/Wan22FunControlToVideo.svg)

## 实战提示

- 宽高必须是 8 的倍数；SDXL 建议总像素约 1024²，Flux 建议 1MP 左右。
- 批量出图显存占用线性增长，爆显存时优先降 batch 而不是降分辨率。

## 同类节点

[WanFunControl视频](/nodes/03/WanFunControlToVideo.md)
