Instructions to use ByteDance/SDXL-Lightning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ByteDance/SDXL-Lightning with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ByteDance/SDXL-Lightning", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
Speed and Quality Combined: Working with SDXL-Lightning Model
SDXL-Lightning, a novel progressive adversarial diffusion distillation method developed by researchers at ByteDance (the company behind TikTok), aims to generate high-quality images with minimal steps, hence its name "lightning."
Building upon the groundwork laid by SDXL Turbo and LCM-LoRA, this approach incorporates a range of enhancements to overcome the primary limitations of its predecessors.
Unlike a single multi-step model, SDXL-Lightning offers optimized checkpoints tailored for various applications. These checkpoints include an experimental version for one-step inference, along with checkpoints for 2, 4, and 8 steps. Users have the flexibility to download the complete model with all its components, solely the U-Net model, or a LoRA module for compatibility with other Stable Diffusion XL models (excluding the 1-step checkpoint, where the LoRA module is unavailable).
Powerful Features:
- Blazing-Fast Speed: Generate stunning images in seconds.
- Cutting-Edge Technology: Leverages advanced techniques (Progressive Adversarial Diffusion Distillation) for exceptional results.
- Open and Accessible: Freely available for exploration and customization by anyone.
This article(https://exnrt.com/blog/ai/sdxl-lightning-model-huggingface/) explores the workings of SDXL-Lightning, its introduced enhancements, and a comparative analysis against other models within its domain. I've also covered how to use SDXL Lightning in ComfyUI with some variants.