ComfyUI-TeaCache
Run ComfyUI Easily with InstaSD
Skip the complex setup. InstaSD helps creative professionals build workflows and deploy them to the world:
- One-click deployment
- Any model, any node
- Powerful GPUs for rapid iteration
Available Nodes
TeaCacheForCogVideoX
TeaCacheForCogVideoX Node Documentation
Overview
The TeaCacheForCogVideoX node is an integration of the Timestep Embedding Aware Cache (TeaCache) technique into the ComfyUI framework, specifically tailored for use with the CogVideoX models. This node allows for a significant acceleration of video generation through caching mechanisms, offering a balance between speed and visual quality.
Features
- Speed Enhancement: TeaCache is designed to provide up to 2x speed improvements for the CogVideoX models when enabled, without significant loss in visual quality.
- Compatibility: Seamlessly integrates with kijai's ComfyUI-CogVideoXWrapper nodes to enhance video diffusion tasks.
- Configurable: Users can adjust the caching strength (
rel_l1_thresh) to fine-tune the balance between acceleration and output quality.
Inputs
The TeaCacheForCogVideoX node requires the following inputs:
- Model: The CogVideoX model to which the TeaCache will be applied. This is a required input.
- Enable TeaCache: A boolean option that allows users to enable or disable the caching mechanism. By default, this is set to True.
- Rel L1 Threshold: A floating-point number that determines how aggressively the output of the diffusion model is cached. This threshold controls the caching strength, balancing speed with output quality. It must be a non-negative value and is configurable within a typical range of 0.0 to 10.0, with a default setting of 0.3.
Outputs
The node outputs the following:
- Model: The modified CogVideoX model with TeaCache applied, if enabled. This model output can be integrated into subsequent steps of a ComfyUI workflow.
Usage
In ComfyUI workflows, the TeaCacheForCogVideoX node is typically included after loading the CogVideoX model and before executing video generation tasks. Here's a general guide on its usage:
- Integrate in Workflow: Add the TeaCacheForCogVideoX node to your workflow following the loading of a CogVideoX model.
- Configure Settings: Determine if you want to enable the caching mechanism and set how aggressive the caching should be through the
rel_l1_threshparameter. - Connect: Link the output of this node to subsequent nodes or operations within your workflow that require the modified CogVideoX model.
Considerations
- Visual Quality vs. Speed: Higher values of
rel_l1_threshmight result in faster processing but could slightly degrade the visual quality. Users are encouraged to experiment with different settings to achieve their desired balance. - VRAM Usage: While cache acceleration can increase inference speed, it may also impact VRAM usage depending on the
cache_deviceconfiguration in the TeaCache ecosystem. - Model Compatibility: This node specifically supports CogVideoX models and should be used in conjunction with compatible wrapper nodes for optimal performance.
Acknowledgments
The integration is built upon the TeaCache technique developed by ali-vilab/TeaCache, which innovatively reduces computation times by caching and reusing certain model outputs during video diffusion processes.