Instructions to use stabilityai/sdxl-turbo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use stabilityai/sdxl-turbo with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("stabilityai/sdxl-turbo", 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
Simple colab notebook
Here is a simple google colab notebook with txt2img. there is also an auto-translation of the prompt via google translate.
https://colab.research.google.com/drive/1_7hTIKkIKJOkGqIevOTX5L8cViayBNR9
Thank you for sharing. It also work on CPU runtime averaging at 105 it/s.
Only work with the full precision variant of course.
pipe = AutoPipelineForText2Image.from_pretrained("stabilityai/sdxl-turbo") # full precision variant
# pipe.to("cuda") comment this line to run on CPU
Thank you for sharing. It also work on CPU runtime averaging at 105 it/s.
Strange, I only get 60s/it in colab when I use the processor. But still added an installation option for CPU.
60s/it in colab when I use the processor.
100s/it, thats bat
But still added an installation option for CPU
now there is GPU auto-detection
now a similar notebook on a regular SD Turbo
https://colab.research.google.com/drive/1QOKQao24dwzPCR08uRM3RbInlClX-N17?usp=sharing