diffusersRepository55/100 via “memory-efficient inference with device management and quantization”
🤗 Diffusers: State-of-the-art diffusion models for image, video, and audio generation in PyTorch.
Unique: Provides a unified API for enabling multiple memory optimizations (attention slicing, token merging, mixed precision, CPU offloading) without code changes. Optimizations are composable and can be enabled/disabled dynamically based on available hardware. The library automatically selects optimal optimization strategies based on device type and available memory.
vs others: More flexible than monolithic optimization because it enables fine-grained control over individual optimization techniques. Outperforms naive quantization because it combines multiple techniques (mixed precision, attention slicing, token merging) to achieve better quality-efficiency tradeoffs.