ComfyUI > Nodes > ComfyUI-WanVideoWrapper > WanVideo Block Swap

ComfyUI Node: WanVideo Block Swap

Class Name

WanVideoBlockSwap

Category
WanVideoWrapper
Author
kijai (Account age: 2871days)
Extension
ComfyUI-WanVideoWrapper
Latest Updated
2026-05-05
Github Stars
6.41K

How to Install ComfyUI-WanVideoWrapper

Install this extension via the ComfyUI Manager by searching for ComfyUI-WanVideoWrapper
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-WanVideoWrapper in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

WanVideo Block Swap Description

Enhances video model processing efficiency through selective transformer block swapping for optimized resource allocation.

WanVideo Block Swap:

The WanVideoBlockSwap node is designed to enhance the flexibility and efficiency of video model processing by allowing selective swapping of transformer blocks within a model. This capability is particularly beneficial for optimizing memory usage and computational efficiency during video processing tasks. By enabling the swapping of specific blocks, the node allows for dynamic allocation of resources, ensuring that only the necessary parts of the model are actively engaged in processing at any given time. This can lead to significant improvements in performance, especially in scenarios where memory constraints are a concern. The node's primary goal is to provide a mechanism for fine-tuning the model's operation, allowing users to tailor the processing to their specific needs and constraints.

WanVideo Block Swap Input Parameters:

model

The model parameter is a required input that specifies the video model to be used for block swapping. This parameter is crucial as it defines the base model upon which the block swap operations will be performed. The model serves as the foundation for all subsequent processing, and its selection can significantly impact the results of the block swap operation. There are no specific minimum, maximum, or default values for this parameter, as it depends on the available models within the system.

block_swap_args

The block_swap_args parameter is an optional input that provides additional arguments for the block swap operation. These arguments can include specifications such as which blocks to swap, whether to offload text or image embeddings, and other configuration settings that influence the behavior of the block swap. By adjusting these arguments, users can fine-tune the block swap process to better suit their specific requirements. If not provided, the node will proceed with default settings, which may not leverage the full potential of the block swap capabilities.

WanVideo Block Swap Output Parameters:

model

The model output parameter returns the modified video model after the block swap operation has been applied. This output is crucial as it represents the updated state of the model, reflecting any changes made during the block swap process. The modified model can then be used for further processing or analysis, with the expectation that it will perform more efficiently or effectively based on the adjustments made. The output model retains all the original functionalities but with enhanced performance characteristics due to the optimized block configuration.

WanVideo Block Swap Usage Tips:

  • To maximize the efficiency of the WanVideoBlockSwap node, carefully consider which blocks to swap based on your specific processing needs and memory constraints. This can help in achieving a balance between performance and resource usage.
  • Experiment with different block_swap_args configurations to find the optimal settings for your particular video processing task. Adjusting parameters such as offload_txt_emb and offload_img_emb can lead to significant improvements in processing speed and memory usage.

WanVideo Block Swap Common Errors and Solutions:

Invalid range: '<part>'

  • Explanation: This error occurs when the block range specified in the block_swap_args is not valid, possibly due to incorrect formatting or out-of-bounds indices.
  • Solution: Ensure that the block range is correctly formatted and within the valid range of block indices. Use a format like 0-5 or 0,2,3-5 to specify ranges accurately.

Invalid integer: '<part>'

  • Explanation: This error indicates that a non-integer value was provided where an integer was expected, typically in the block_swap_args.
  • Solution: Check the input for any non-integer values and correct them to ensure all specified values are integers. This will prevent parsing errors and ensure the block swap operation proceeds smoothly.

WanVideo Block Swap Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-WanVideoWrapper
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

WanVideo Block Swap