Skip to content

Commit b4e1e2e

Browse files
gblong1arisha07luke-lin-vmcymangukiyanschaper-intel
committed
v2.99-R3-Release branch merge to Main (#135)
--------- Co-authored-by: Kumar, Arisha <[email protected]> Co-authored-by: Luke Lin <[email protected]> Co-authored-by: ymangukiya <[email protected]> Co-authored-by: nschaper-intel <[email protected]> Co-authored-by: Siwoo Park <[email protected]> Co-authored-by: Long, Garth <[email protected]> Co-authored-by: Metcalfe, Ryan <[email protected]> Co-authored-by: Rafael Lago <[email protected]>
1 parent e8158a7 commit b4e1e2e

File tree

101 files changed

+2408
-743
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+2408
-743
lines changed

Docs/figs/gimp_load_model.png

9.08 KB
Loading

Docs/figs/gimp_sd_ui.png

7.08 KB
Loading
35.1 KB
Loading
21.2 KB
Loading
23.7 KB
Loading
68 KB
Loading

Docs/figs/standalone1.png

49.2 KB
Loading

Docs/figs/standalone2.png

121 KB
Loading

Docs/stable-diffusion-v3.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Image generation with Stable Diffusion 3.0
2+
3+
Stable Diffusion V3 is next generation of latent diffusion image Stable Diffusion models family that outperforms state-of-the-art text-to-image generation systems in typography and prompt adherence, based on human preference evaluations.
4+
5+
In comparison with previous versions, it based on Multimodal Diffusion Transformer (MMDiT) text-to-image model that features greatly improved performance in image quality, typography, complex prompt understanding, and resource-efficiency.
6+
7+
More details about model can be found in [model card](https://huggingface.co/stabilityai/stable-diffusion-3-medium), [research paper](https://stability.ai/news/stable-diffusion-3-research-paper) and [Stability.AI blog post](https://stability.ai/news/stable-diffusion-3-medium).
8+
9+
## Enabling SD3 in GIMP
10+
### Converting the Models
11+
The supported version of SD3 in GIMP is the flash_sd3 LoRA. In order to use with GIMP, you first need to download and convert the model into OpenVINO format. This can be done by following the instructions in the [OpenVINO Stable Diffusion v3 Notebook](https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/stable-diffusion-v3).
12+
>**Note**: Ensure you use the instructions for flash_sd3.
13+
14+
### Model Installation
15+
After completing the steps in the notebook, you will have the models located in `openvino_notebooks\notebooks\stable-diffusion-v3\stable-diffusion-3`. Copy these models to `openvino-ai-plugins-gimp\weights\stable-diffusion-ov\stable-diffusion-3.0`
16+
17+
For example, using robocopy to copy the files on the command line:
18+
```
19+
robocopy openvino_notebooks\notebooks\stable-diffusion-v3\stable-diffusion-3\ %userprofile%\openvino-ai-plugins-gimp\weights\stable-diffusion-ov\stable-diffusion-3.0\. /mir
20+
```
21+
After copying, create a file called `install_info.json` inside the stable-diffusion-3.0 directory. This will ensure that the GIMP plugin will recognize this as a valid model. It should contain the following text:
22+
```
23+
{
24+
"hf_repo_id": "none",
25+
"hf_commit_id": "none"
26+
}
27+
```
28+
29+
Verify that the copied files and directory structure looks as follows:
30+
31+
![image](https://github.com/user-attachments/assets/039073d1-e593-4365-92c9-3555ea023670)
32+
### Running with GIMP
33+
After completing model installation steps, SD3 will now be available in the Stable Diffusion UI. Note that SD3 can generate valid images in as few as 4 iterations. Also, the guidance scale needed is normally much lower. See the screenshot below:
34+
![image](https://github.com/user-attachments/assets/6daf3201-b873-4198-a752-19594f352c50)
35+
36+
37+
38+

Docs/user_guide_for_windows_users.md

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ Please download [gimp-2.99.16-setup.exe](https://download.gimp.org/gimp/v2.99/wi
105105
cd C:\Users\Public\
106106
mkdir GIMP
107107
cd GIMP
108-
109-
git clone https://github.com/intel/openvino-ai-plugins-gimp.git
108+
git clone --branch v2.99-R3 https://github.com/intel/openvino-ai-plugins-gimp.git
110109
```
111110
> __Notes__:
112111
> This is an example that will create a `GIMP` folder in `C:\Users\Public\`, and then download the package to `C:\Users\Public\GIMP`, you still can define where to place this package by yourself.
@@ -119,19 +118,7 @@ Please download [gimp-2.99.16-setup.exe](https://download.gimp.org/gimp/v2.99/wi
119118

120119
This step will take time for downloading necessary packages.
121120

122-
123-
- After creating python environment, gimpenv3, and downloaded necessary packages, you will be prompted to download models
124-
- Enter __\<number\>__ for downloading models you want to run. You can specify multiple models separated by spaces:
125-
126-
![](figs/model_downloding_SD1.5.png)
127-
128-
- Download "__1__", SD-1.5 Square (512x512) as an instance. Once installation process is completed when you see the messages below.
129-
130-
![](figs/download_SD1.5.png)
131-
132-
>**Notes:**
133-
> - The downloaded models include FP16 and INT8 precision, and INT8 precision can be executed on MTL NPU.
134-
> - Weights is saved at `C:\Users\<user_name>\openvino-ai-plugins-gimp\weights`.
121+
- After creating python environment, gimpenv3, and downloaded necessary packages, you can now start GIMP application from Start Menu.
135122

136123
# Execute Stable-Diffusion in GIMP
137124

@@ -143,18 +130,36 @@ With previous section, the GIMP AI plugins with OpenVINO™ Backend is installed
143130

144131
You can now simply open Gimp from the start menu as you would any normal Windows application.
145132

146-
## Execute Stable-Diffusion – SD1.5_square_int8
133+
## Download & Install Stable Diffusion Models
134+
- Once GIMP application is started, Click "__Layer__" \> "__OpenVINO-AI-Plugins__" \> "__Stable diffusion__".
135+
- Once Stable Diffusion Plugin UI opens up, click on Model Button on the top left corner as show in the below picture:
147136

148-
Please follow below steps to execute Stable-Diffusion - SD1.5_square_int8. For other features, please refer to [OpenVINO™ Image Generator Plugin with Stable Diffusion](https://github.com/intel/openvino-ai-plugins-gimp/tree/main?tab=readme-ov-file#openvino-image-generator-plugin-with-stable-diffusion) section.
137+
![](figs/stable-diffusion_model1.png)
138+
- This now opens the Stable Diffusion Model Management window from where you can install the required models by clicking on "Install" button next to the model name.
149139

150-
- Following previous section to launch GIMP
140+
![](figs/stable-diffusion_model2.png)
151141

152-
![](figs/gimp_launch.png)
142+
- Download Stable Diffusion 1.5 Square as an instance.
153143

154-
- Click "__File__" \> "__New__" \> "__OK__" to new a layer in GIMP
144+
![](figs/stable-diffusion_model3.png)
145+
146+
- Once installation process is completed, you will see the "Install" button is updated to "Installed" and you will find the models in the drop-down list
155147

156-
![](figs/gimp_create_image.png)
157-
![](figs/gimp_ok.png)
148+
![](figs/stable-diffusion_model4.png)
149+
150+
>**Notes:**
151+
> - The downloaded models include FP16 and INT8 precision
152+
> - Weights is saved at `C:\Users\<user_name>\openvino-ai-plugins-gimp\weights`.
153+
154+
155+
156+
## Execute Stable-Diffusion – Stable Diffusion 1.5 INT8
157+
158+
Please follow below steps to execute Stable-Diffusion - Stable Diffusion 1.5 INT8. For other features, please refer to [OpenVINO™ Image Generator Plugin with Stable Diffusion](https://github.com/intel/openvino-ai-plugins-gimp/tree/main?tab=readme-ov-file#openvino-image-generator-plugin-with-stable-diffusion) section.
159+
160+
- Following previous section to launch GIMP
161+
162+
![](figs/gimp_launch.png)
158163

159164
- Click "__Layer__" \> "__OpenVINO-AI-Plugins__" \> "__Stable diffusion__".
160165

@@ -177,10 +182,3 @@ Please follow below steps to execute Stable-Diffusion - SD1.5_square_int8. For o
177182
> - Balanced
178183
> - If you wish to generate more images in single run, please modify the Number of Images section.
179184
180-
### Detail of Power Mode
181-
182-
| Power mode | Execution detail |
183-
|----------:|:----------------|
184-
| Best Performance | Text Device: GPU<br>Unet Device: GPU<br>Unet-Neg Device: GPU<br>VAE Device: GPU |
185-
| Best Power Efficiency | Text Device: NPU<br>Unet Device: NPU<br>Unet-Neg Device: NPU<br>VAE Device: GPU |
186-
| Balanced | Text Device: NPU<br>Unet Device: NPU<br>Unet-Neg Device: GPU<br>VAE Device: GPU |

0 commit comments

Comments
 (0)