Skip to content

Commit a2fc3a9

Browse files
authored
Added quantization to ControlNet QR Code Monster notebook (#1521)
* Added quantization to ControlNet QR Code Monster notebook * minor
1 parent 27d98f8 commit a2fc3a9

File tree

2 files changed

+658
-89
lines changed

2 files changed

+658
-89
lines changed

notebooks/264-qrcode-monster/264-qrcode-monster.ipynb

Lines changed: 653 additions & 86 deletions
Large diffs are not rendered by default.

notebooks/264-qrcode-monster/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@
22

33
[Stable Diffusion](https://github.com/CompVis/stable-diffusion), a cutting-edge image generation technique, but it can be further enhanced by combining it with [ControlNet](https://github.com/lllyasviel/ControlNet), a widely used control network approach. The combination allows Stable Diffusion to use a condition input to guide the image generation process, resulting in highly accurate and visually appealing images. The condition input could be in the form of various types of data such as scribbles, edge maps, pose key points, depth maps, segmentation maps, normal maps, or any other relevant information that helps to guide the content of the generated image, for example - QR codes! This method can be particularly useful in complex image generation scenarios where precise control and fine-tuning are required to achieve the desired results.
44

5-
In this tutorial, we will learn how to convert and run [Controlnet QR Code Monster For SD-1.5](https://huggingface.co/monster-labs/control_v1p_sd15_qrcode_monster) by [monster-labs](https://qrcodemonster.art/).
5+
In this tutorial, we will learn how to convert and run [Controlnet QR Code Monster For SD-1.5](https://huggingface.co/monster-labs/control_v1p_sd15_qrcode_monster) by [monster-labs](https://qrcodemonster.art/). An additional part demonstrates how to run quantization with [NNCF](https://github.com/openvinotoolkit/nncf/) to speed up pipeline.
66

77
![](https://github.com/openvinotoolkit/openvino_notebooks/assets/76463150/1a5978c6-e7a0-4824-9318-a3d8f4912c47)
88

99
## Notebook Contents
1010

11-
This notebook demonstrates how to convert and run ControlNet and Stable Diffusion using OpenVINO.
11+
This notebook demonstrates how to convert, run and optimize ControlNet and Stable Diffusion using OpenVINO and NNCF.
1212

1313
Notebook contains the following steps:
1414
1. Create pipeline with PyTorch models using Diffusers library.
1515
2. Convert PyTorch models to OpenVINO IR format using model conversion API.
16-
3. Run Stable Diffusion ControlNet pipeline with OpenVINO.
16+
3. Optimize `OVContrlNetStableDiffusionPipeline` with [NNCF](https://github.com/openvinotoolkit/nncf/) quantization.
17+
4. Compare results of original and optimized pipelines.
18+
5. Run Stable Diffusion ControlNet pipeline with OpenVINO.
1719

1820
## Installation Instructions
1921

0 commit comments

Comments
 (0)