ComfyUI > Nodes > ComfyUI-WanVideoWrapper > WanVideo MagCache

ComfyUI Node: WanVideo MagCache

Class Name

WanVideoMagCache

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 MagCache Description

Specialized video processing node optimizing efficiency through caching mechanisms for smoother performance in iterative workflows.

WanVideo MagCache:

WanVideoMagCache is a specialized node designed to enhance video processing efficiency by leveraging caching mechanisms. Its primary purpose is to optimize the handling of video data, particularly in scenarios where repeated access to certain data segments is required. By implementing a caching strategy, WanVideoMagCache reduces the computational load and accelerates processing times, making it an invaluable tool for AI artists working with video content. The node is particularly beneficial in workflows that involve iterative processing steps, as it minimizes redundant computations and ensures smoother performance. The caching mechanism is activated based on specific conditions, allowing for flexible and adaptive usage tailored to the needs of the project.

WanVideo MagCache Input Parameters:

enable_magcache

This parameter determines whether the MagCache feature is activated. When set to True, the caching mechanism is enabled, allowing the node to store and reuse data efficiently. This can significantly improve processing speed and reduce computational overhead. The default value is False.

magcache_start_step

This parameter specifies the starting step from which the MagCache should begin caching data. It allows users to define the point in the processing workflow where caching becomes active. The default value is 0, indicating that caching starts from the beginning.

magcache_end_step

This parameter defines the ending step for the MagCache operation. It sets the limit up to which the caching mechanism remains active. A value of -1 indicates that caching continues until the end of the process. This flexibility allows users to tailor the caching duration to their specific needs.

magcache_thresh

This parameter sets the threshold for caching operations. It determines the sensitivity of the caching mechanism, influencing which data segments are stored. A lower threshold means more data is cached, potentially improving performance but using more memory. The default value is 0.24.

magcache_K

This parameter controls the caching strategy by defining the number of data segments to be cached. It allows users to balance between memory usage and processing speed. The default value is 4, providing a moderate caching level suitable for most applications.

magcache_ratios

This parameter allows users to specify custom caching ratios, providing fine-grained control over the caching behavior. By adjusting these ratios, users can optimize the caching process to better suit their specific video processing tasks.

WanVideo MagCache Output Parameters:

cached_data

This output parameter represents the data that has been cached during the processing workflow. It provides a reference to the stored data segments, allowing for quick access and reuse in subsequent processing steps. The cached data is crucial for enhancing performance and reducing redundant computations.

WanVideo MagCache Usage Tips:

  • To maximize performance, enable the MagCache feature only when dealing with repetitive processing tasks where data reuse is beneficial.
  • Adjust the magcache_thresh and magcache_K parameters to find the optimal balance between memory usage and processing speed for your specific project.
  • Use the magcache_start_step and magcache_end_step parameters to precisely control when caching should occur, ensuring that resources are used efficiently.

WanVideo MagCache Common Errors and Solutions:

"MagCache not enabled"

  • Explanation: This error occurs when the MagCache feature is not activated, but caching operations are attempted.
  • Solution: Ensure that the enable_magcache parameter is set to True before initiating the caching process.

"Invalid caching step range"

  • Explanation: This error indicates that the specified start and end steps for caching are not valid, possibly due to incorrect values.
  • Solution: Verify that the magcache_start_step and magcache_end_step parameters are set correctly, ensuring that the start step is less than or equal to the end step.

"Threshold value out of range"

  • Explanation: This error suggests that the magcache_thresh parameter is set to a value outside the acceptable range.
  • Solution: Adjust the magcache_thresh parameter to a value within the recommended range, typically between 0 and 1, to ensure proper caching behavior.

WanVideo MagCache 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 MagCache