rupeshs commited on
Commit
c253195
1 Parent(s): 1a450b5

Updated readme

Browse files
Files changed (1) hide show
  1. README.md +27 -0
README.md CHANGED
@@ -12,3 +12,30 @@ The SDXL-Lightning model is converted to OpenVINO for fast inference on CPU.
12
  Original Model : [SDXL-Lightning](https://huggingface.co/ByteDance/SDXL-Lightning)
13
 
14
  You can use this model with [FastSD CPU](https://github.com/rupeshs/fastsdcpu).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  Original Model : [SDXL-Lightning](https://huggingface.co/ByteDance/SDXL-Lightning)
13
 
14
  You can use this model with [FastSD CPU](https://github.com/rupeshs/fastsdcpu).
15
+
16
+ To run the model yourself, you can leverage the 🧨 Diffusers library:
17
+
18
+ 1. Install the dependencies:
19
+ ```
20
+ pip install optimum-intel openvino diffusers onnx
21
+ ```
22
+ 2. Run the model:
23
+ ```py
24
+ from optimum.intel.openvino.modeling_diffusion import OVStableDiffusionXLPipeline
25
+
26
+ pipeline = OVStableDiffusionXLPipeline.from_pretrained(
27
+ "rupeshs/SDXL-Lightning-2steps-openvino-int8",
28
+ ov_config={"CACHE_DIR": ""},
29
+ )
30
+ prompt = "Teddy bears working on new AI research on the moon in the 1980s"
31
+
32
+ images = pipeline(
33
+ prompt=prompt,
34
+ width=768,
35
+ height=768,
36
+ num_inference_steps=2,
37
+ guidance_scale=1.0,
38
+ ).images
39
+ images[0].save("out_image.png")
40
+ ```
41
+