> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-chore-sync-comfy-api-v2-spec-d5155ac.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ComfyUI Wan2.1 VACE Video Examples

> This article introduces how to complete Wan VACE video generation examples in ComfyUI

<Warning>
  As we have made adjustments to the template and added related usage and instructions for CausVid LoRA, this document needs to be updated and requires some preparation time. Until then, please refer to the notes in the template for usage.
</Warning>

## About VACE

VACE 14B is an open-source unified video editing model launched by the Alibaba Tongyi Wanxiang team. Through integrating multi-task capabilities, supporting high-resolution processing and flexible multi-modal input mechanisms, this model significantly improves the efficiency and quality of video creation.

The model is open-sourced under the [Apache-2.0](https://github.com/ali-vilab/VACE?tab=Apache-2.0-1-ov-file) license and can be used for personal or commercial purposes.

Here is a comprehensive analysis of its core features and technical highlights:

* Multi-modal input: supports multiple input forms including text, images, video, masks, and control signals
* Unified architecture: single model supports multiple tasks with freely combinable functions
* Motion transfer: generates coherent actions based on reference videos
* Local replacement: replaces specific areas in videos through masks
* Video extension: completes actions or extends backgrounds
* Background replacement: preserves subjects while changing environmental backgrounds

Currently VACE has released two versions: 1.3B and 14B. Compared to the 1.3B version, the 14B version supports 720P resolution output with better image details and stability.

| Model                                                       | 480P | 720P |
| ----------------------------------------------------------- | ---- | ---- |
| [VACE-1.3B](https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B) | ✅    | ❌    |
| [VACE-14B](https://huggingface.co/Wan-AI/Wan2.1-VACE-14B)   | ✅    | ✅    |

Related model weights and code repositories:

<CardGroup cols={2}>
  <Card title="VACE-1.3B" icon="download" href="https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B">
    1.3B model weights on Hugging Face
  </Card>

  <Card title="VACE-14B" icon="download" href="https://huggingface.co/Wan-AI/Wan2.1-VACE-14B">
    14B model weights on Hugging Face
  </Card>

  <Card title="GitHub Repository" icon="github" href="https://github.com/ali-vilab/VACE">
    VACE source code and documentation
  </Card>

  <Card title="VACE Project Page" icon="globe" href="https://ali-vilab.github.io/VACE-Page/">
    Official project homepage with examples
  </Card>
</CardGroup>

<Tip>
  <Tabs>
    <Tab title="Local users">
      Make sure your ComfyUI is updated.

      * [Download ComfyUI](https://www.comfy.org/download)
      * [Update Guide](/installation/update_comfyui)

      Workflows in this guide can be found in the [Workflow Templates](/interface/features/template).
      If you can't find them in the template, your ComfyUI may be outdated.

      If nodes are missing when loading a workflow, possible reasons:

      1. You are not using the latest ComfyUI version (Nightly version)
      2. Some nodes failed to import at startup
    </Tab>

    <Tab title="Cloud users">
      * [Cloud](https://cloud.comfy.org) will update after ComfyUI stable release.

      So, if you find any core node missing in this document, it might be because the new core nodes have not yet been released in the latest stable version. Please wait for the next stable release.
    </Tab>
  </Tabs>
</Tip>

## Model Download and Loading in Workflows

Since the workflows covered in this document all use the same workflow template, we can first complete the model download and loading information introduction, then enable or disable different inputs through bypassing different nodes to achieve different workflows.
The model download information is already embedded in the workflow information in specific examples, so you can also complete the model download when downloading specific example workflows.

### Model Download

**Diffusion Models**

<CardGroup cols={2}>
  <Card title="wan2.1_vace_14B_fp16.safetensors" icon="download" href="https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/blob/main/split_files/diffusion_models/wan2.1_vace_14B_fp16.safetensors">
    VACE 14B diffusion model (recommended, \~32GB). Place in <code>ComfyUI/models/diffusion\_models/</code>
  </Card>

  <Card title="wan2.1_vace_1.3B_fp16.safetensors" icon="download" href="https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/blob/main/split_files/diffusion_models/wan2.1_vace_1.3B_fp16.safetensors">
    VACE 1.3B diffusion model (lighter, \~7GB). Place in <code>ComfyUI/models/diffusion\_models/</code>
  </Card>
</CardGroup>

<Tip>
  If you have used Wan Video related workflows before, you have already downloaded the following model files.
</Tip>

**VAE**

<CardGroup cols={2}>
  <Card title="wan_2.1_vae.safetensors" icon="download" href="https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/blob/main/split_files/vae/wan_2.1_vae.safetensors">
    Wan VAE model. Place in <code>ComfyUI/models/vae/</code>
  </Card>
</CardGroup>

**Text Encoders** (choose one version)

<CardGroup cols={2}>
  <Card title="umt5_xxl_fp16.safetensors" icon="download" href="https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/blob/main/split_files/text_encoders/umt5_xxl_fp16.safetensors">
    Full precision text encoder (higher quality, larger size). Place in <code>ComfyUI/models/text\_encoders/</code>
  </Card>

  <Card title="umt5_xxl_fp8_e4m3fn_scaled.safetensors" icon="download" href="https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/blob/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors">
    FP8 text encoder (lower VRAM usage). Place in <code>ComfyUI/models/text\_encoders/</code>
  </Card>
</CardGroup>

File save location:

```
📂 ComfyUI/
├── 📂 models/
│   ├── 📂 diffusion_models/
│   │   └─── wan2.1_vace_14B_fp16.safetensors
│   ├── 📂 text_encoders/
│   │   └─── umt5_xxl_fp8_e4m3fn_scaled.safetensors # or umt5_xxl_fp16.safetensors
│   └── 📂 vae/
│       └──  wan_2.1_vae.safetensors
```

### Model Loading

Since the models used in the workflows covered in this document are consistent, the workflows are also the same, and only the nodes are bypassed to enable or disable different inputs. Please refer to the following image to ensure that the corresponding models are correctly loaded in different workflows.

<img src="https://mintcdn.com/dripart-chore-sync-comfy-api-v2-spec-d5155ac/5Sq6D0IamWsyOWw4/images/tutorial/video/wan/wan-vace-model-loading.jpg?fit=max&auto=format&n=5Sq6D0IamWsyOWw4&q=85&s=450774ff2202913e766ef33a91e83a8e" alt="Wan2.1 VACE Model Loading" width="2910" height="1394" data-path="images/tutorial/video/wan/wan-vace-model-loading.jpg" />

1. Make sure the `Load Diffusion Model` node has loaded `wan2.1_vace_14B_fp16.safetensors`
2. Make sure the `Load CLIP` node has loaded `umt5_xxl_fp8_e4m3fn_scaled.safetensors` or `umt5_xxl_fp16.safetensors`
3. Make sure the `Load VAE` node has loaded `wan_2.1_vae.safetensors`

### How to toggle Node Bypass Status

When a node is set to Bypass status, data passing through the node will not be affected by the node and will be output directly. We often set nodes to Bypass status when we don't need them.
Here are three ways to toggle a node's Bypass status:

<img src="https://mintcdn.com/dripart-chore-sync-comfy-api-v2-spec-d5155ac/z75b4e96BWV5AZBF/images/interface/nodes/cancel-bypass.jpg?fit=max&auto=format&n=z75b4e96BWV5AZBF&q=85&s=7b35ec589de00e2ff0fa86c7cc45bd8d" alt="Toggle Bypass" width="1830" height="1128" data-path="images/interface/nodes/cancel-bypass.jpg" />

1. After selecting the node, click the arrow in the indicator section of the selection toolbox to quickly toggle the node's Bypass status
2. After selecting the node, right-click the node and select `Mode` -> `Always` to switch to Always mode
3. After selecting the node, right-click the node and select the `Bypass` option to toggle the Bypass status

***

## 1. VACE Text-to-Video

**What it does:** Transform text descriptions into high-quality videos using the Wan2.1 VACE 14B model. Supports both 480p and 720p resolution.

<h3 id="video_wan_vace_14B_t2v">
  Wan2.1 VACE Text to Video
</h3>

Transform text descriptions into high-quality videos. Supports both 480p and 720p with VACE-14B model.

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/video_wan_vace_14B_t2v-1.webp" alt="Wan2.1 VACE Text to Video workflow preview" />

<CardGroup cols={2}>
  <Card title="Run on Comfy Cloud" icon="cloud" href="https://cloud.comfy.org/?template=video_wan_vace_14B_t2v&utm_source=docs&utm_medium=referral&utm_campaign=vace">
    Open in Comfy Cloud
  </Card>

  <Card title="Download Workflow" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/video_wan_vace_14B_t2v.json">
    Download JSON or search "Wan2.1 VACE Text to Video" in Template Library
  </Card>
</CardGroup>

<video controls className="w-full aspect-video" src="https://github.com/Comfy-Org/example_workflows/raw/refs/heads/main/video/wan/vace/vace-t2v.mp4" />

<Tip>
  If you cannot load the workflow from mp4 file, please ensure that your ComfyUI front-end version is up to date version in [requirements.txt](https://github.com/Comfy-Org/ComfyUI/blob/master/requirements.txt), make sure you can load the workflow from mp4 file.

  Currently 1.19.9 is the latest ComfyUI front-end version in the requirements.txt file.
</Tip>

### Steps to Run

<img src="https://mintcdn.com/dripart-chore-sync-comfy-api-v2-spec-d5155ac/5Sq6D0IamWsyOWw4/images/tutorial/video/wan/wan-vace-t2v-step-guide.jpg?fit=max&auto=format&n=5Sq6D0IamWsyOWw4&q=85&s=16d2b8b568729d5066688f4644b7b861" alt="image" width="3018" height="1394" data-path="images/tutorial/video/wan/wan-vace-t2v-step-guide.jpg" />

Please follow the numbered steps in the image to ensure smooth workflow execution:

1. Enter positive prompts in the `CLIP Text Encode (Positive Prompt)` node
2. Enter negative prompts in the `CLIP Text Encode (Negative Prompt)` node
3. Set the image dimensions (640x640 resolution recommended for first run) and frame count (video duration) in `WanVaceToVideo`
4. Click the `Run` button or use the shortcut `Ctrl(cmd) + Enter` to execute video generation
5. Once generated, the video will automatically save to `ComfyUI/output/video` directory (subfolder location depends on `save video` node settings)

<Tip>
  During testing with a 4090 GPU:

  * 720x1280 resolution, generating 81 frames takes about 40 minutes
  * 640x640 resolution, generating 49 frames takes about 7 minutes

  However, 720P video quality is better.
</Tip>

***

## 2. VACE Image-to-Video

**What it does:** Generate videos that match the style and content of a reference image. Perfect for style-consistent video generation.

You can continue using the workflow above, just unbypass the `Load image` node in **Load reference image** and input your image. You can also use the image below. In this file we have already set up the corresponding parameters.

<h3 id="video_wan_vace_14B_ref2v">
  Wan2.1 VACE Reference to Video
</h3>

Create videos that match the style and content of a reference image. Perfect for style-consistent video generation.

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/video_wan_vace_14B_ref2v-1.webp" alt="Wan2.1 VACE Reference to Video workflow preview" />

<CardGroup cols={2}>
  <Card title="Run on Comfy Cloud" icon="cloud" href="https://cloud.comfy.org/?template=video_wan_vace_14B_ref2v&utm_source=docs&utm_medium=referral&utm_campaign=vace">
    Open in Comfy Cloud
  </Card>

  <Card title="Download Workflow" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/video_wan_vace_14B_ref2v.json">
    Download JSON or search "Wan2.1 VACE Reference to Video" in Template Library
  </Card>
</CardGroup>

<video controls className="w-full aspect-video" src="https://raw.githubusercontent.com/Comfy-Org/example_workflows/refs/heads/main/video/wan/vace/i2v/vace_i2v.mp4" />

**Input materials**

Upload this file to the matching `LoadImage` node:

<CardGroup cols={2}>
  <Card title="video_wan_vace_14B_ref2v_reference_image.jpg" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/video_wan_vace_14B_ref2v_reference_image.jpg">
    `LoadImage` node 73 · `video_wan_vace_14B_ref2v_reference_image.jpg`
  </Card>
</CardGroup>

<div style={{display: 'grid', gridTemplateColumns: 'repeat(2, minmax(0, 1fr))', gap: '1rem', alignItems: 'start'}}>
  <img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/video_wan_vace_14B_ref2v_reference_image.jpg" alt="video_wan_vace_14B_ref2v_reference_image.jpg" style={{width: '100%', height: 'auto', objectFit: 'contain'}} />
</div>

### Steps to Run

<img src="https://mintcdn.com/dripart-chore-sync-comfy-api-v2-spec-d5155ac/5Sq6D0IamWsyOWw4/images/tutorial/video/wan/wan-vace-i2v-step-guide.jpg?fit=max&auto=format&n=5Sq6D0IamWsyOWw4&q=85&s=5c9b67469801500e554facbb68aea2ea" alt="Workflow Steps" width="2912" height="1317" data-path="images/tutorial/video/wan/wan-vace-i2v-step-guide.jpg" />

Please follow the numbered steps in the image to ensure smooth workflow execution:

1. Input the corresponding image in the `Load image` node
2. You can modify and edit prompts like in the text-to-video workflow
3. Set the image dimensions (640x640 resolution recommended for first run) and frame count (video duration) in `WanVaceToVideo`
4. Click the `Run` button or use the shortcut `Ctrl(cmd) + Enter` to execute video generation
5. Once generated, the video will automatically save to `ComfyUI/output/video` directory (subfolder location depends on `save video` node settings)

<Tip>
  You may want to use nodes like getting image dimensions to set the resolution, but due to width and height step requirements of the corresponding nodes, you may get error messages if your image dimensions are not divisible by 16.
</Tip>

### Additional Notes

VACE also supports inputting multiple reference images in a single image to generate corresponding videos. You can see related examples on the VACE project [page](https://ali-vilab.github.io/VACE-Page/).

***

## 3. VACE Video-to-Video

**What it does:** Generate videos by controlling input videos and reference images using Wan VACE. Control video style and motion through reference materials.

<h3 id="video_wan_vace_14B_v2v">
  Wan2.1 VACE Control Video
</h3>

Generate videos by controlling input videos and reference images using Wan VACE.

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/video_wan_vace_14B_v2v-1.webp" alt="Wan2.1 VACE Control Video workflow preview" />

<CardGroup cols={2}>
  <Card title="Run on Comfy Cloud" icon="cloud" href="https://cloud.comfy.org/?template=video_wan_vace_14B_v2v&utm_source=docs&utm_medium=referral&utm_campaign=vace">
    Open in Comfy Cloud
  </Card>

  <Card title="Download Workflow" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/video_wan_vace_14B_v2v.json">
    Download JSON or search "Wan2.1 VACE Control Video" in Template Library
  </Card>
</CardGroup>

<video controls className="w-full aspect-video" src="https://raw.githubusercontent.com/Comfy-Org/example_workflows/refs/heads/main/video/wan/vace/v2v/vace_v2v.mp4" />

We will use the following materials as input:

<CardGroup cols={2}>
  <Card title="Reference Image" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/video_wan_vace_14B_v2v_reference_image.jpg">
    Input reference image for style and content.
  </Card>

  <Card title="Control Video (Preprocessed)" icon="video" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/video_wan_vace_14B_v2v_reference_image_control_video.mp4">
    Preprocessed control video (depth). Use directly in <code>Load Video</code> under <strong>Load control video</strong>.
  </Card>
</CardGroup>

1. Input image for reference:

![v2v-input](https://raw.githubusercontent.com/Comfy-Org/example_workflows/refs/heads/main/video/wan/vace/v2v/input.jpg)

2. The video below has been preprocessed and will be used to control video generation:

<video controls className="w-full aspect-video" src="https://raw.githubusercontent.com/Comfy-Org/example_workflows/refs/heads/main/video/wan/vace/v2v/post+depth.mp4" />

3. The video below is the original video. You can download these materials and use preprocessing nodes like [comfyui\_controlnet\_aux](https://github.com/Fannovel16/comfyui_controlnet_aux) to preprocess the images:

<video controls className="w-full aspect-video" src="https://raw.githubusercontent.com/Comfy-Org/example_workflows/refs/heads/main/video/wan/vace/v2v/original.mp4" />

### Steps to Run

<img src="https://mintcdn.com/dripart-chore-sync-comfy-api-v2-spec-d5155ac/5Sq6D0IamWsyOWw4/images/tutorial/video/wan/wan-vace-v2v-step-guide.jpg?fit=max&auto=format&n=5Sq6D0IamWsyOWw4&q=85&s=c6ead2ab74fed08ba9cec4d104fd2307" alt="Workflow Steps" width="2912" height="1317" data-path="images/tutorial/video/wan/wan-vace-v2v-step-guide.jpg" />

Please follow the numbered steps in the image to ensure smooth workflow execution:

1. Input the reference image in the `Load Image` node under **Load reference image**
2. Input the control video in the `Load Video` node under **Load control video**. Since the provided video is preprocessed, no additional processing is needed
3. If you need to preprocess the original video yourself, you can modify the **Image preprocessing** group or use `comfyui_controlnet_aux` nodes to complete the preprocessing
4. Modify prompts
5. Set the image dimensions (640x640 resolution recommended for first run) and frame count (video duration) in `WanVaceToVideo`
6. Click the `Run` button or use the shortcut `Ctrl(cmd) + Enter` to execute video generation
7. Once generated, the video will automatically save to `ComfyUI/output/video` directory (subfolder location depends on `save video` node settings)

***

## 4. VACE Inpainting

**What it does:** Edit specific regions in videos while preserving surrounding content. Great for object removal or replacement.

<h3 id="video_wan_vace_inpainting">
  Wan2.1 VACE Inpainting
</h3>

Edit specific regions in videos while preserving surrounding content. Great for object removal or replacement.

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/video_wan_vace_inpainting-1.webp" alt="Wan2.1 VACE Inpainting workflow preview" />

<CardGroup cols={2}>
  <Card title="Run on Comfy Cloud" icon="cloud" href="https://cloud.comfy.org/?template=video_wan_vace_inpainting&utm_source=docs&utm_medium=referral&utm_campaign=vace">
    Open in Comfy Cloud
  </Card>

  <Card title="Download Workflow" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/video_wan_vace_inpainting.json">
    Download JSON or search "Wan2.1 VACE Inpainting" in Template Library
  </Card>
</CardGroup>

**Input materials**

<CardGroup cols={2}>
  <Card title="Input Video" icon="video" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/video_wan_vace_inpainting_input_video.mp4">
    Input video for inpainting. Load in the <code>Load Video</code> node.
  </Card>

  <Card title="First Frame & Mask" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/video_wan_vace_inpainting_1st_frame_and_mask.png">
    First frame with mask overlay for inpainting region.
  </Card>

  <Card title="Reference Image" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/video_wan_vace_inpainting_reference_image.jpg">
    Reference image for inpainting content.
  </Card>
</CardGroup>

\[To be updated]

***

## 5. VACE Video Outpainting

**What it does:** Generate extended videos by expanding video size using Wan VACE outpainting.

<h3 id="video_wan_vace_outpainting">
  Wan2.1 VACE Outpainting
</h3>

Generate extended videos by expanding video size using Wan VACE outpainting.

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/video_wan_vace_outpainting-1.webp" alt="Wan2.1 VACE Outpainting workflow preview" />

<CardGroup cols={2}>
  <Card title="Run on Comfy Cloud" icon="cloud" href="https://cloud.comfy.org/?template=video_wan_vace_outpainting&utm_source=docs&utm_medium=referral&utm_campaign=vace">
    Open in Comfy Cloud
  </Card>

  <Card title="Download Workflow" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/video_wan_vace_outpainting.json">
    Download JSON or search "Wan2.1 VACE Outpainting" in Template Library
  </Card>
</CardGroup>

**Input materials**

<CardGroup cols={2}>
  <Card title="Input Video" icon="video" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/video_wan_vace_outpainting_input_video.mp4">
    Input video for outpainting. Load in the <code>Load Video</code> node.
  </Card>
</CardGroup>

\[To be updated]

***

## 6. VACE First-Last Frame Video Generation

**What it does:** Generate smooth video transitions by defining start and end frames. Supports custom keyframe sequences.

<h3 id="video_wan_vace_flf2v">
  Wan2.1 VACE First-Last Frame
</h3>

Generate smooth video transitions by defining start and end frames. Supports custom keyframe sequences.

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/video_wan_vace_flf2v-1.webp" alt="Wan2.1 VACE First-Last Frame workflow preview" />

<CardGroup cols={2}>
  <Card title="Run on Comfy Cloud" icon="cloud" href="https://cloud.comfy.org/?template=video_wan_vace_flf2v&utm_source=docs&utm_medium=referral&utm_campaign=vace">
    Open in Comfy Cloud
  </Card>

  <Card title="Download Workflow" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/video_wan_vace_flf2v.json">
    Download JSON or search "Wan2.1 VACE First-Last Frame" in Template Library
  </Card>
</CardGroup>

**Input materials**

<CardGroup cols={2}>
  <Card title="Start Frame" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/video_wan_vace_flf2v_start_image.png">
    Starting frame image. Load in the <code>Load Image</code> node.
  </Card>

  <Card title="End Frame" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/video_wan_vace_flf2v_end_image.png">
    Ending frame image. Load in the <code>Load Image</code> node.
  </Card>
</CardGroup>

To ensure that the first and last frames are effective, the video `length` setting must satisfy that `length-1` is divisible by 4.

The corresponding `Batch_size` setting must satisfy `Batch_size = length - 2`.

\[To be updated]
