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
Update readme
Browse files
README.md
CHANGED
|
@@ -77,7 +77,7 @@ from huggingface_hub import hf_hub_download
|
|
| 77 |
|
| 78 |
base = "stabilityai/stable-diffusion-xl-base-1.0"
|
| 79 |
repo = "ByteDance/SDXL-Lightning"
|
| 80 |
-
ckpt = "
|
| 81 |
|
| 82 |
# Load model.
|
| 83 |
pipe = StableDiffusionXLPipeline.from_pretrained(base, torch_dtype=torch.float16, variant="fp16").to("cuda")
|
|
|
|
| 77 |
|
| 78 |
base = "stabilityai/stable-diffusion-xl-base-1.0"
|
| 79 |
repo = "ByteDance/SDXL-Lightning"
|
| 80 |
+
ckpt = "sdxl_lightning_1step_unet_x0.pth" # Use the correct ckpt for your step setting!
|
| 81 |
|
| 82 |
# Load model.
|
| 83 |
pipe = StableDiffusionXLPipeline.from_pretrained(base, torch_dtype=torch.float16, variant="fp16").to("cuda")
|