chengzeyi/Comfy-WaveSpeed
https://wavespeed.ai/ [WIP] The all in one inference optimization solution for ComfyUI, universal, flexible, and fast.
What it solves
Comfy-WaveSpeed provides inference optimization for ComfyUI, reducing the time and computational cost required to generate images and videos using large diffusion models. It addresses the slow speed of local inference for high-resolution or complex models like FLUX, SD3.5, and HunyuanVideo.
How it works
The project implements two primary optimization techniques:
- First Block Cache (FBCache): This dynamic caching algorithm uses the residual output of the first transformer block as an indicator. If the difference between the current and previous residual output is small enough, the system reuses the previous final residual output and skips the computation of all subsequent transformer blocks, potentially speeding up inference by 1.5x to 3.0x.
- Enhanced
torch.compile: An improved version of the standard PyTorch compilation process that optimizes the model's execution graph. Unlike the original TorchCompileModel node, this version is compatible with LoRA.
Who it’s for
Users of ComfyUI who run diffusion models locally on their own GPUs and want to increase generation speed without significant loss in image or video quality.
Highlights
- Broad Model Support: Works with FLUX, LTXV, HunyuanVideo, SD3.5, and SDXL.
- Significant Speedups: FBCache can achieve up to 2x speedup while maintaining high accuracy.
- LoRA Compatibility: The enhanced compilation node supports the use of LoRA models.
- Flexible Configuration: Users can adjust the
residual_diff_threashold to balance speed and quality based on the specific model being used.
Related
- Project
Jasonzzt/ComfyUI-CacheDiTA ComfyUI extension that accelerates Diffusion Transformer (DiT) models through intelligent caching, providing 1.4x to 2.0x speedups for image and video generation.
- Project
hao-ai-lab/FastVideoFastVideo is an open‑source framework for training, fine‑tuning, and real‑time inference of video diffusion models. It offers sparse‑attention distillation, scalable multi‑GPU training, and cross‑platform support (NVIDIA GPUs, Apple Silicon via MLX, ARM DGX Spark). The library includes a CLI, Python API, and the Dreamverse app for live video editing. Install via `uv` and start generating videos with a few lines of Python.
- Project
vipshop/cache-ditCache‑DiT is a PyTorch‑native inference engine that accelerates diffusion transformer (DiT) models with hybrid caching, various parallelism strategies, quantization, and CPU off‑load. Built on Hugging Face Diffusers, it supports 40+ model families (image, video, audio, 3‑D) and integrates with tools like SGLang, vLLM‑Omni, TensorRT‑LLM, and ComfyUI. The package offers up to 9× speed‑up, works on NVIDIA, AMD and Ascend hardware, and provides a GitHub SKILL for easy agent‑assisted model integration.
- Project
NVlabs/FastGenA PyTorch-based framework for accelerating diffusion models using various distillation and acceleration techniques for image and video generation.
- Project
ModelTC/LightX2VLightX2V is an open‑source inference framework for fast image and video generation. It supports many models (MiniMax‑H3, LTX‑2, HunyuanVideo‑1.5, Wan‑2.x, Qwen‑Image, etc.) and offers speed‑up tricks like 4‑step distilled LoRAs, FP8/NVFP4 quantisation, tensor‑parallelism, and disaggregated deployment on a wide range of accelerators. Users interact via a single `LightX2VPipeline` class, choosing a model, variant and a JSON config, then call `generate` with a task (e.g., t2av, t2v, i2i). Reported benchmarks show up to ~4× speedup over Diffusers on H100 GPUs. The project provides Docker images, a macOS app, online demo, and extensive docs and examples.