Discover and explore top open-source AI tools and projects—updated daily.
Zehong-MaAccelerating diffusion model inference with caching
Top 97.5% on SourcePulse
Summary
This repository integrates MagCache, a training-free approach for accelerating video and image diffusion model inference, into ComfyUI. It targets ComfyUI users seeking significant speedups (2x-3x) without extensive retraining, offering a seamless node-based integration for faster content generation.
How It Works
MagCache employs a magnitude-aware caching strategy. It estimates fluctuating differences between model outputs across timesteps by observing output magnitudes. This enables an error modeling mechanism and adaptive caching, accelerating inference without requiring model fine-tuning. The approach is effective for various image and video diffusion models.
Quick Start & Requirements
Installation involves cloning the repository into ComfyUI/custom_nodes/, navigating to the directory, and running pip install -r requirements.txt. Users must prepare ComfyUI-formatted model weights for supported models like Wan2.1, HunyuanVideo, FLUX, Chroma, and Qwen-Image. The Compile Model node, utilizing torch.compile, may incur significant initial compilation times but yields extremely fast subsequent inference. Demo workflows are available in the examples folder.
Highlighted Details
Compile Model node that leverages torch.compile for optimized inference performance.Maintenance & Community
The project appears actively developed, with frequent updates and model support additions. Community involvement is encouraged through a discussion issue for sharing optimal parameter configurations.
Licensing & Compatibility
The specific open-source license is not explicitly stated in the provided README text. Compatibility is primarily focused on the ComfyUI ecosystem.
Limitations & Caveats
While aiming for acceptable quality loss, users may observe reduced visual fidelity, particularly with Wan2.1 generated videos compared to unquantized outputs. Default parameters are tuned for maximum speed and might cause failures in certain scenarios. Specific calibration workflows are recommended for models like Chroma when inference steps deviate from defaults.
1 month ago
Inactive
hao-ai-lab