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
FAQ: Does lightning-lora favoring real people? Or does it affect the comic book model?
As above
@lyk0013 its more based on the model you apply to. If you apply to a realistic checkpoint like juggernaut or realvisxl, you will get realistic people but if you apply to a more cartoony checkpoint, then more cartoony people.
To get better quality overall, you should merge unets instead of applying loras, or just try pretrained lightning merges, for example realvisxl lightning or dreamshaper lightning as they give considerably better quality then loras alone.
Will merge Unet affect the original style of the checkpoint? I will give it a try. If you have any good experience to share, thank you very much.
@lyk0013 No, it should not really. You might need to experiment a bit to get optimal results but it should be similar to the original style.
I used a tool named Checkpoint Merger,in webui. Using 8-step sampling on the fused model, the result looks unfinished. So, for unets is it necessary to retrain.
Environments:
Base model: Animagine XL V 31
Unets: sdxl_lightning_8step_unet.safetensors
Tools: Checkpoint Merger
Params: Multiplier : 0.8