Update README.md
Browse files
README.md
CHANGED
@@ -29,21 +29,21 @@ pip install optimum[openvino]
|
|
29 |
2. Run model inference:
|
30 |
|
31 |
```
|
32 |
-
from
|
33 |
-
from optimum.intel.openvino import OVModelForCausalLM
|
34 |
|
35 |
model_id = "OpenVINO/LCM_Dreamshaper_v7-fp16-ov"
|
36 |
-
|
37 |
-
model = OVModelForCausalLM.from_pretrained(model_id)
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
outputs = model.generate(**inputs, max_length=200)
|
42 |
-
text = tokenizer.batch_decode(outputs)[0]
|
43 |
-
print(text)
|
44 |
```
|
45 |
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
## Legal information
|
49 |
|
|
|
29 |
2. Run model inference:
|
30 |
|
31 |
```
|
32 |
+
from optimum.intel.openvino import OVStableDiffusionPipeline
|
|
|
33 |
|
34 |
model_id = "OpenVINO/LCM_Dreamshaper_v7-fp16-ov"
|
35 |
+
pipeline = OVStableDiffusionPipeline.from_pretrained(model_id)
|
|
|
36 |
|
37 |
+
prompt = "sailing ship in storm by Rembrandt"
|
38 |
+
images = pipeline(prompt, num_inference_steps=4).images
|
|
|
|
|
|
|
39 |
```
|
40 |
|
41 |
+
## Usage examples
|
42 |
+
|
43 |
+
* [OpenVINO notebooks](https://github.com/openvinotoolkit/openvino_notebooks):
|
44 |
+
- [Latent Consistency Model using Optimum-Intel OpenVINO](https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/latent-consistency-models-image-generation/latent-consistency-models-optimum-demo.ipynb)
|
45 |
+
* [OpenVINO GenAI](https://github.com/openvinotoolkit/openvino.genai):
|
46 |
+
- [C++ image generation pipeline](https://github.com/openvinotoolkit/openvino.genai/tree/master/image_generation/lcm_dreamshaper_v7/cpp)
|
47 |
|
48 |
## Legal information
|
49 |
|