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 Settings
- Draw Things
- DiffusionBee
1-Step UNet quality?!
As said in the doc, one step is experimental. It has a higher probability generating bad shapes. Some seeds and prompts perform better, but you should stick to 2+ steps for stable results. And use UNet instead of LoRA unless you are using other base models for the best result :)
Prompt outputs failed validation
UNETLoader:
- Value not in list: unet_name: 'sdxl_lightning_1step_unet_x0.pth' not in ['sdxl_lightning_1step_unet_x0.safetensors', 'sdxl_lightning_8step_unet.safetensors']
ModelSamplingDiscrete: - Value not in list: sampling: 'x0' not in ['eps', 'v_prediction', 'lcm']
- The workflow got updated. Redownload your workflow
- You didn't download the correct checkpoint
- You are not using the latest comfyui
There was an update recently today in ComfyUI that adds "x0" which is needed in order to not get that terrible random noise output.
I haven't checked if the uploader updated the workflow, but here is mine embedded in this image:
and this is what mine looks like: (below image doesn't include workflow)
Also be sure you are using an SDXL VAE
Try
https://huggingface.co/stabilityai/sdxl-vae/blob/main/sdxl_vae.safetensors
Or this FP16 version:
https://huggingface.co/madebyollin/sdxl-vae-fp16-fix/blob/main/sdxl.vae.safetensors
try a FACE




