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
using onnx models
#34
by kartikpodugu - opened
I ran sample script to generate image using this model. I am able to run both on CPU and using Nvidia CPU.
But, the script uses models with extension .safetensors.
The "Files and Versions" tab also has onnx models in each folder unet, text encoder and vae encoder, decoder.
What needs to be done in the script to use ONNX models instead of .safetensors files that are used by default.
Anybody please help.
I need to run the onnx model using onnxruntime on CPU.