File size: 1,097 Bytes
32eaa18
375f337
16d8aef
 
 
9ab232e
16d8aef
9ab232e
 
 
da51fce
 
 
 
 
 
e44ece1
da51fce
d12d364
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
43
44
45
---
license: creativeml-openrail-m
language:
- en
tags:
- 'stablediffusion '
- lcm
- latent consistency model
- openvino
pipeline_tag: text-to-image
---

*rupeshs/LCM-dreamshaper-v7-openvino* is a LCM-LoRA fused model for OpenVINO that allows image generation with only 4 steps.

Original Model : [Lykon/dreamshaper-7](https://huggingface.co/Lykon/dreamshaper-7)

You can use this model with [FastSD CPU](https://github.com/rupeshs/fastsdcpu).

![Sample](./sample.png)

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 OVStableDiffusionPipeline

pipeline = OVStableDiffusionPipeline.from_pretrained(
    "rupeshs/LCM-dreamshaper-v7-openvino",
    ov_config={"CACHE_DIR": ""},
)
prompt = "Self-portrait,a beautiful cyborg with golden hair, 8k"

images = pipeline(
    prompt=prompt,
    width=512,
    height=512,
    num_inference_steps=4,
    guidance_scale=1.0,
).images
images[0].save("out_image.png")
```