DEV Community

Cover image for SwarmUI Teacache Full Tutorial With Very Best Wan 2.1 I2V & T2V Presets - ComfyUI Used as Backend - 2x and more Speed Up
Furkan Gözükara
Furkan Gözükara

Posted on

SwarmUI Teacache Full Tutorial With Very Best Wan 2.1 I2V & T2V Presets - ComfyUI Used as Backend - 2x and more Speed Up

Teacache & Wan 2.1 Integration Tutorial for SwarmUI

🎥 Video Tutorial

Watch the full tutorial on YouTube

https://youtu.be/r38eWyNoXHo

📋 Overview

This tutorial demonstrates how to use Teacache to significantly accelerate AI generation speeds in SwarmUI with ComfyUI backend. Learn how to properly configure and use Wan 2.1 Text-to-Image and Text-to-Video models with optimized presets for maximum performance.

🔗 Essential Resources

Download Links

Prerequisites Tutorials

Community Resources

⏱️ Tutorial Timeline

Time Topic
0:00 Introduction: Teacache & Wan 2.1 Presets for Swarm UI
0:35 Prerequisites: Previous Tutorials & Updating Swarm UI Files
1:09 Running the Swarm UI Update Script
1:21 Importing the New Presets into Swarm UI
1:46 Enabling Advanced Options & Locating Teacache Installer
1:57 Understanding Teacache: Faster Generation, Minimal Quality Loss
2:14 Monitoring Teacache Installation Process via CMD
2:32 Teacache Installed: Preparing for Image-to-Video Generation
2:43 Applying Image-to-Video Preset & Initial Configuration
3:04 Selecting Init Image & Base Model (e.g., Wan 2.1 480p)
3:25 How to Download Models via Swarm UI Downloader
3:52 Choosing Specific Image-to-Video Models (FP16/GGUF Q8)
4:04 Setting Correct Resolution & Aspect Ratio from Model Metadata
4:25 Key Image-to-Video Settings: Model Override & Video Frames
4:42 Optimizing Video Steps (30) & CFG (6) for Teacache
5:01 Configuring Teacache Mode (All) & Threshold (15%)
5:08 Setting Frame Interpolation (2x for 32 FPS) & Duration
5:22 Starting Image-to-Video: Importance of Latest Swarm UI
5:41 Generation Started: Teacache & Step Skipping Explained
6:05 Observing Teacache in Action: Step Jumps & How It Works
6:23 Leveraging Sage Attention & ComfyUI's Automated Setup
6:38 Teacache Performance Boost: Example Speed Increase (IT/s)
6:51 Understanding ComfyUI Block Swapping & Monitoring GPU Usage
7:18 Image-to-Video Generation Complete: Total Time & Output
7:32 Accessing Generated Video & Output Format Options (H.265)
7:55 Text-to-Video: Applying Preset & Adjusting Core Settings
8:13 Configuring Text-to-Video Parameters: Steps (30), FPS, Format
8:27 Selecting Text-to-Video Model (GGUF Q8) & Setting Resolution
8:45 Advanced Settings: UniPC Sampler, Sigma Shift (8), CFG Impact
9:03 Enabling Teacache (15%) for Text-to-Video
9:15 Starting HD Text-to-Video Generation (GGUF Q8 Model)
9:36 Understanding Performance: HD Resolution & Frame Count Impact
9:54 Text-to-Video Complete: Time Taken & Teacache Speedup
10:06 Downloading & Reviewing the Full HD Text-to-Video Result
10:19 Comparing Prompt Effectiveness: Image-to-Video vs. Text-to-Video
10:30 Conclusion: Future Presets & Power of Swarm UI with ComfyUI

🚀 What is TeaCache?

TeaCache (Timestep Embedding Aware Cache) is a revolutionary, training-free approach that significantly accelerates diffusion models without substantial quality degradation.

How TeaCache Works

Diffusion models work by progressively removing noise over multiple timesteps. TeaCache intelligently decides when to reuse cached computations instead of performing expensive recalculations:

  1. Timestep Embedding Analysis: Uses timestep embeddings as indicators of how much the model's output will change
  2. Similarity Prediction: Compares current timestep embedding with previous ones
  3. Smart Caching Decision:
    • If similarity is high → Skip computation, reuse cached results
    • If similarity is low → Perform full computation, update cache
  4. Adaptive Thresholding: User-controllable rel_l1_thresh parameter balances speed vs quality

Key Advantages

  • Training-Free: Works with existing pre-trained models
  • Significant Speedup: 1.5x to 2x+ faster inference
  • Broad Compatibility: Works across image, video, and audio models
  • User Control: Adjustable quality/speed trade-off

🎯 Supported Models

Text-to-Video (T2V)

  • Wan2.1, Cosmos, CogVideoX1.5, LTX-Video, Mochi, HunyuanVideo
  • CogVideoX, Open-Sora, Open-Sora-Plan, Latte
  • EasyAnimate, FramePack, FastVideo (community)

Image-to-Video (I2V)

  • Wan2.1, Cosmos, CogVideoX1.5, ConsisID
  • EasyAnimate, Ruyi-Models (community)

Video-to-Video (V2V)

  • EasyAnimate (community)

Text-to-Image (T2I)

  • FLUX, Lumina-T2X

Text-to-Audio (T2A)

  • TangoFlux

⚙️ Key Configuration Settings

Image-to-Video Settings

  • Steps: 30 (optimized for Teacache)
  • CFG: 6
  • Teacache Mode: All
  • Teacache Threshold: 15%
  • Frame Interpolation: 2x for 32 FPS

Text-to-Video Settings

  • Steps: 30
  • Sampler: UniPC
  • Sigma Shift: 8
  • Resolution: Based on model metadata
  • Teacache: 15% threshold

🎓 About the Creator

Dr. Furkan Gözükara - Assistant Professor in Software Engineering

  • 🎓 PhD in Computer Engineering
  • 📺 37,000+ YouTube subscribers
  • 🎯 Expert-level tutorials on AI, Stable Diffusion, and generative models

📞 Connect & Learn


This tutorial provides comprehensive guidance for implementing Teacache acceleration in SwarmUI, enabling faster AI video and image generation with minimal quality loss.

Top comments (0)