Wan2.1 VACE Outpainting
Generate extended videos by expanding video size using Wan VACE outpainting.
About
This ComfyUI workflow teaches you how to outpaint a video—expanding its canvas while keeping the original content intact—using Wan 2.1 VACE. It loads your source clip with LoadVideo and extracts dimensions and frame count via GetVideoComponents and PreviewImage. You then define where to expand using ImagePadForOutpaint and a mask built from ImageToMask/MaskToImage, replicated across time with RepeatImageBatch. Prompts are encoded with CLIPTextEncode, and generation runs through KSampler with ModelSamplingSD3 scheduling on a Wan 2.1 VACE UNet/Decoder stack (UNETLoader, VAELoader), with VAEDecode converting latents to frames.
What you provide
- Reading the workflow
Runs in ComfyUI. This workflow can't run on this page. Open it in Comfy Cloud with everything loaded, or download it for your own ComfyUI.
Try in CloudQuestions & answers
WanVaceToVideo and the VAE downsample spatially by powers of two, so dimensions must align to 16 for clean latent shapes. The temporal pathway expects sequence lengths that satisfy (frames - 1) % 4 == 0. TrimVideoLatent enforces the temporal rule; set your target resolution to multiples of 16 for the spatial rule.
Use 1.3B for faster runs and 480p outputs on modest GPUs. Choose 14B for higher quality and, if your VRAM allows, higher resolutions such as 720p. The 14B model produces better detail but is slower and more memory-intensive.
Use ImagePadForOutpaint to add canvas on chosen sides (top/bottom/left/right). Then create a mask that protects the original video region (ImageToMask/MaskToImage) and replicate it across frames with RepeatImageBatch. The model synthesizes only in the unmasked, newly padded areas.
Verify three points: 1) Output width/height are divisible by 16, 2) TrimVideoLatent is applied so (frames - 1) is divisible by 4, 3) VAEDecode is connected before CreateVideo/SaveVideo. Also confirm fps and frame count from GetVideoComponents, and that your mask batch length matches the video length.
Related workflows
- Wan2.1
Animation Trajectory Control
- Wan2.1, ChronoEdit, Nvidia
ChronoEdit 14B
- Wan2.1, ChronoEdit, Nvidia
ChronoEdit 14B: Image Edit
- Wan2.1, Wan
Wan 2.1 ControlNet
- Wan2.1, Wan
Wan 2.1 FLF2V 720p F16
- Wan2.1, Wan
Wan 2.1 Fun Camera 1.3B
- Wan2.1, Wan
Wan 2.1 Fun Camera 14B
- Wan2.1, Wan
Wan 2.1 Image to Video
- Wan2.1, Wan
Wan 2.1 Inpainting
- Wan2.1, Wan
Wan 2.1 Text to Video
- Wan, Wan2.1
Wan-Move Motion-Control Image to Video
- Wan2.1, Wan
Wan2.1 Alpha T2V