File size: 981 Bytes
c80ae1d 1a450b5 c253195 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
---
license: openrail++
language:
- en
tags:
- 'stablediffusion '
- openvino
- ADD
---
The SDXL-Lightning model is converted to OpenVINO for fast inference on CPU.
Original Model : [SDXL-Lightning](https://huggingface.co/ByteDance/SDXL-Lightning)
You can use this model with [FastSD CPU](https://github.com/rupeshs/fastsdcpu).
To run the model yourself, you can leverage the 🧨 Diffusers library:
1. Install the dependencies:
```
pip install optimum-intel openvino diffusers onnx
```
2. Run the model:
```py
from optimum.intel.openvino.modeling_diffusion import OVStableDiffusionXLPipeline
pipeline = OVStableDiffusionXLPipeline.from_pretrained(
"rupeshs/SDXL-Lightning-2steps-openvino-int8",
ov_config={"CACHE_DIR": ""},
)
prompt = "Teddy bears working on new AI research on the moon in the 1980s"
images = pipeline(
prompt=prompt,
width=768,
height=768,
num_inference_steps=2,
guidance_scale=1.0,
).images
images[0].save("out_image.png")
```
|