ComfyUI > Nodes > ComfyUI-TeaCache > TeaCache

ComfyUI Node: TeaCache

Class Name

TeaCache

Category
TeaCache
Author
welltop-cn (Account age: 1895days)
Extension
ComfyUI-TeaCache
Latest Updated
2025-04-24
Github Stars
0.76K

How to Install ComfyUI-TeaCache

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

Optimize diffusion model performance with caching for AI artists, reducing computational load and accelerating workflow.

TeaCache:

TeaCache is a node designed to optimize the performance of diffusion models by implementing a caching mechanism that can significantly speed up inference processes. This node is particularly beneficial for AI artists working with models that require repeated computations, as it reduces the computational load by caching intermediate results. The primary goal of TeaCache is to enhance efficiency without compromising the visual quality of the output. By intelligently deciding when to reuse cached data, it minimizes redundant calculations, thus accelerating the overall workflow. This makes it an invaluable tool for those looking to streamline their creative processes while working with complex models.

TeaCache Input Parameters:

model

The model parameter refers to the specific diffusion model to which the TeaCache will be applied. It is crucial as it determines the context in which the caching mechanism will operate, ensuring that the correct model is optimized for performance improvements.

enable_teacache

The enable_teacache parameter is a boolean that determines whether the caching mechanism is active. When set to True, it enables the caching feature, which can significantly speed up the inference process. However, users should be aware that enabling this feature might lead to a slight reduction in visual quality. The default value is True.

rel_l1_thresh

The rel_l1_thresh parameter is a float that controls the strength of the caching mechanism by setting a threshold for the relative L1 distance. This value must be non-negative and typically ranges from 0.0 to 10.0, with a default of 0.3. A lower threshold means more aggressive caching, which can lead to faster performance but may also increase the risk of quality degradation. Adjusting this parameter allows users to balance between speed and quality according to their specific needs.

TeaCache Output Parameters:

model

The model output parameter returns the optimized diffusion model after the TeaCache has been applied. This model is now equipped with the caching mechanism, which should result in faster inference times. The output model retains its original functionality but benefits from the performance enhancements provided by the caching process.

TeaCache Usage Tips:

  • To maximize performance gains, enable the enable_teacache parameter, especially when working with large models or complex scenes that require extensive computation.
  • Adjust the rel_l1_thresh parameter to find the right balance between speed and visual quality. Start with the default value and make incremental changes to see how it affects your specific use case.

TeaCache Common Errors and Solutions:

"AttributeError: 'NoneType' object has no attribute 'transformer'"

  • Explanation: This error occurs when the model provided does not have a valid transformer attribute, possibly due to an incorrect model input or initialization failure.
  • Solution: Ensure that the model input is correctly initialized and compatible with the TeaCache node. Verify that the model has a transformer attribute before applying the TeaCache.

"ValueError: rel_l1_thresh must be non-negative"

  • Explanation: This error is raised when the rel_l1_thresh parameter is set to a negative value, which is not allowed.
  • Solution: Check the rel_l1_thresh parameter and ensure it is set to a non-negative value within the allowed range (0.0 to 10.0). Adjust the value to meet the requirements of your specific application.

TeaCache Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-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 Playground, enabling artists to harness the latest AI tools to create incredible art.