Update README.md
Browse files
README.md
CHANGED
|
@@ -40,21 +40,23 @@ pip install optimum[openvino]
|
|
| 40 |
2. Run model inference:
|
| 41 |
|
| 42 |
```
|
| 43 |
-
|
| 44 |
-
from optimum.intel.openvino import
|
| 45 |
|
| 46 |
model_id = "OpenVINO/stable-diffusion-v1-5-int8-ov"
|
| 47 |
-
|
| 48 |
-
model = OVModelForCausalLM.from_pretrained(model_id)
|
| 49 |
-
|
| 50 |
-
inputs = tokenizer("What is OpenVINO?", return_tensors="pt")
|
| 51 |
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
print(text)
|
| 55 |
```
|
| 56 |
|
| 57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
## Limitations
|
| 60 |
|
|
|
|
| 40 |
2. Run model inference:
|
| 41 |
|
| 42 |
```
|
| 43 |
+
```
|
| 44 |
+
from optimum.intel.openvino import OVStableDiffusionPipeline
|
| 45 |
|
| 46 |
model_id = "OpenVINO/stable-diffusion-v1-5-int8-ov"
|
| 47 |
+
pipeline = OVStableDiffusionPipeline.from_pretrained(model_id)
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
+
prompt = "sailing ship in storm by Rembrandt"
|
| 50 |
+
images = pipeline(prompt, num_inference_steps=4).images
|
|
|
|
| 51 |
```
|
| 52 |
|
| 53 |
+
## Usage examples
|
| 54 |
+
|
| 55 |
+
* [OpenVINO notebooks](https://github.com/openvinotoolkit/openvino_notebooks):
|
| 56 |
+
- [Latent Consistency Model using Optimum-Intel OpenVINO](https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/stable-diffusion-text-to-image/stable-diffusion-text-to-image.ipynb)
|
| 57 |
+
* [OpenVINO GenAI](https://github.com/openvinotoolkit/openvino.genai):
|
| 58 |
+
- [C++ image generation pipeline](https://github.com/openvinotoolkit/openvino.genai/tree/master/image_generation/stable_diffusion_1_5/cpp)
|
| 59 |
+
```
|
| 60 |
|
| 61 |
## Limitations
|
| 62 |
|