Run ComfyUI Easily with InstaSD

Skip the complex setup and run ComfyUI online. InstaSD helps creative professionals build workflows and deploy them to the world:

  • One-click deployment
  • Any model, any node
  • Powerful GPUs for rapid iteration
Get Started

Documentation

ComfyUI-TeaCache

Introduction

ComfyUI-TeaCache is a repository that integrates the Timestep Embedding Aware Cache (TeaCache) approach into ComfyUI. TeaCache is known for its ability to enhance the performance of diffusion models by leveraging the fluctuating differences among model outputs across different timesteps, thus accelerating inference without additional training. This repository supports various diffusion models for image, video, and audio applications, making it a valuable asset for users aiming to speed up their workflows within ComfyUI.

Installation

Preferred Installation via ComfyUI-Manager

  1. Open ComfyUI-Manager.
  2. Search for ComfyUI-TeaCache in the list of available nodes.
  3. Click install to automatically download and install it.

Manual Installation

  1. Navigate to your ComfyUI custom_nodes folder: ComfyUI/custom_nodes/
  2. Clone the repository:
    git clone https://github.com/welltop-cn/ComfyUI-TeaCache.git
    
  3. Navigate into the cloned repository:
    cd ComfyUI-TeaCache/
    
  4. Install the required dependencies:
    pip install -r requirements.txt
    

Repository Purpose

This repository focuses on enhancing ComfyUI by integrating the TeaCache mechanism, providing users with faster inference capabilities for their diffusion models without sacrificing much visual quality. It is designed to be compatible with the native nodes of ComfyUI and can easily be integrated into existing workflows.

Node Descriptions

TeaCache

The TeaCache node utilizes the TeaCache caching mechanism to enhance the speed of diffusion model inference. It is compatible with several models and configurations, offering significant performance enhancements with minimal visual quality loss.

CompileModel

The CompileModel node uses torch.compile to optimize model performance by compiling it into more efficient intermediate representations, significantly speeding up inference once compiled.

TeaCacheForCogVideoX

Specifically tailored for use with the CogVideoX models, this node utilizes the TeaCache approach to accelerate video diffusion processes.

Special Features and Capabilities

  • Flexible Compatibility: TeaCache nodes can seamlessly integrate with various diffusion models and LoRA extensions in ComfyUI, catering to a wide spectrum of image and video applications.
  • Performance Improvement: Achieve speedups ranging from 1.5x to 3x with minimal visual quality degradation by employing recommended settings for rel_l1_thresh, start_percent, and end_percent.
  • Customizable Cache Device: Users can choose between cuda and cpu for the cache_device option to balance between VRAM usage and inference speed.
  • Example Workflows: The repository offers demo workflows for various models, providing users a quick start to integrate and experiment with TeaCache in their own workflows.

Usefulness in ComfyUI Workflows

The ComfyUI-TeaCache repository is a powerful tool for users looking to enhance the efficiency of their computations in image and video processing pipelines. By integrating seamlessly with ComfyUI native nodes, it allows users to achieve significant inference speedups. The flexibility in settings and device compatibility offers both new and experienced users a mechanism to balance performance with quality, making it an indispensable asset for optimizing workflows in ComfyUI.

Want to try ComfyUI-TeaCache without installing anything? Run ComfyUI online on InstaSD's cloud GPUs — no setup required.