Update README.md
Browse files
README.md
CHANGED
@@ -12,3 +12,28 @@ Original Model : [Hyper-SD](https://huggingface.co/ByteDance/Hyper-SD)
|
|
12 |
|
13 |
You can use this model with [FastSD CPU](https://github.com/rupeshs/fastsdcpu).
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
You can use this model with [FastSD CPU](https://github.com/rupeshs/fastsdcpu).
|
14 |
|
15 |
+
To run the model yourself, you can leverage the 🧨 Diffusers library:
|
16 |
+
|
17 |
+
1. Install the dependencies:
|
18 |
+
```
|
19 |
+
pip install optimum-intel openvino diffusers onnx
|
20 |
+
```
|
21 |
+
2. Run the model:
|
22 |
+
```py
|
23 |
+
from optimum.intel.openvino.modeling_diffusion import OVStableDiffusionXLPipeline
|
24 |
+
|
25 |
+
pipeline = OVStableDiffusionXLPipeline.from_pretrained(
|
26 |
+
"rupeshs/hyper-sd-sdxl-1-step-openvino-int8",
|
27 |
+
ov_config={"CACHE_DIR": ""},
|
28 |
+
)
|
29 |
+
prompt = "a cute cat,flowers"
|
30 |
+
|
31 |
+
images = pipeline(
|
32 |
+
prompt=prompt,
|
33 |
+
width=768,
|
34 |
+
height=768,
|
35 |
+
num_inference_steps=1,
|
36 |
+
guidance_scale=1.0,
|
37 |
+
).images
|
38 |
+
images[0].save("out_image.png")
|
39 |
+
```
|