ComfyUI > Nodes > CUI-Lumina2-TeaCache > TeaCache Patcher

ComfyUI Node: TeaCache Patcher

Class Name

TeaCache_Patcher

Category
utils/analysis
Author
spawner (Account age: 596days)
Extension
CUI-Lumina2-TeaCache
Latest Updated
2026-02-02
Github Stars
0.02K

How to Install CUI-Lumina2-TeaCache

Install this extension via the ComfyUI Manager by searching for CUI-Lumina2-TeaCache
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter CUI-Lumina2-TeaCache 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

TeaCache Patcher Description

TeaCache_Patcher enhances AI model performance by optimizing sequential data processing with caching.

TeaCache Patcher:

The TeaCache_Patcher node is designed to enhance the performance of AI models by integrating the TeaCache mechanism, which optimizes the processing of sequential data. This node is particularly beneficial for tasks that involve large datasets or require high computational efficiency. By applying a patching method, it modifies the model's behavior to utilize cached data effectively, reducing redundant computations and improving overall speed. The primary goal of the TeaCache_Patcher is to streamline the model's operations, making it more efficient without compromising the quality of the output. This node is essential for users looking to optimize their AI models for better performance in tasks such as image processing or natural language processing, where large sequences of data are common.

TeaCache Patcher Input Parameters:

model

The model parameter represents the AI model that will be patched with the TeaCache mechanism. This parameter is crucial as it determines the specific model that will benefit from the caching optimization. The model should be compatible with the TeaCache system to ensure effective patching and performance improvement.

rel_l1_thresh

The rel_l1_thresh parameter is a floating-point value that sets the relative L1 threshold for the caching mechanism. It controls the sensitivity of the cache to changes in the input data. A lower threshold means the cache will be updated more frequently, while a higher threshold will result in less frequent updates. The default value is 6.0, with a minimum of 0.0, allowing for fine-tuning based on the specific needs of the task.

start_percent

The start_percent parameter defines the starting point, as a percentage, of the steps during which the TeaCache will be applied. This allows users to specify when the caching should begin, providing flexibility in managing computational resources. The default value is 0.0, with a range from 0.0 to 1.0, enabling users to tailor the caching process to their workflow.

end_percent

The end_percent parameter specifies the endpoint, as a percentage, of the steps during which the TeaCache will be applied. Similar to start_percent, this parameter allows users to control when the caching should stop, ensuring that resources are used efficiently. The default value is 1.0, with a range from 0.0 to 1.0.

coefficients_string

The coefficients_string parameter is a string that contains the coefficients for the np.poly1d function, which is used in the caching process. These coefficients determine the polynomial used for caching calculations, affecting the accuracy and efficiency of the cache. The default value is a predefined set of coefficients, and users can input their own values in the format: 393.7, -603.5, 209.1, -23.0, 0.86, with or without brackets.

TeaCache Patcher Output Parameters:

MODEL

The output parameter MODEL represents the patched AI model that has been optimized with the TeaCache mechanism. This model is now equipped to handle sequential data more efficiently, with reduced computational overhead and improved processing speed. The patched model maintains the original functionality while benefiting from the enhanced performance provided by the TeaCache system.

TeaCache Patcher Usage Tips:

  • Ensure that the model you are patching is compatible with the TeaCache system to maximize performance improvements.
  • Adjust the rel_l1_thresh parameter based on the sensitivity of your task to changes in input data, balancing between cache update frequency and computational efficiency.
  • Use the start_percent and end_percent parameters to control the duration of caching, optimizing resource usage for tasks with varying computational demands.

TeaCache Patcher Common Errors and Solutions:

Model does not have an 'unpatchify' method.

  • Explanation: This error occurs when the model being patched lacks the necessary unpatchify method, which is required for the TeaCache mechanism to function correctly.
  • Solution: Ensure that the model you are using includes the unpatchify method or modify the model to include this method before applying the TeaCache_Patcher.

adaLN_modulation returned unexpected type or empty list/tuple

  • Explanation: This error indicates that the adaLN_modulation function returned an unexpected type or an empty list/tuple, which is not compatible with the caching process.
  • Solution: Verify that the adaLN_modulation function is correctly implemented and returns a valid tensor or list/tuple. If necessary, adjust the function to ensure it provides the expected output type.

TeaCache Patcher Related Nodes

Go back to the extension to check out more related nodes.
CUI-Lumina2-TeaCache
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.