Skip to content

Commit 64bb7db

Browse files
add Kontext notebook
1 parent 1e204f2 commit 64bb7db

File tree

3 files changed

+756
-0
lines changed

3 files changed

+756
-0
lines changed

notebooks/flux.1-kontext/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Image-to-image generation with Flux.1 Kontext and OpenVINO
2+
3+
FLUX.1 Kontext [dev] is a 12 billion parameter rectified flow transformer capable of editing images based on text instructions. More details about model can be found in [blog post](https://bfl.ai/announcements/flux-1-kontext-dev) and [model card](https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev).
4+
5+
<img src="https://github.com/user-attachments/assets/eaa37f44-6e9f-4c22-b5ed-eb1816e98cd0" width="1024">
6+
7+
In this tutorial, we consider how to convert and optimize Flux.1 Kontext model using OpenVINO.
8+
9+
>**Note**: Some demonstrated models can require at least 32GB RAM for conversion and running.
10+
11+
### Notebook Contents
12+
13+
In this demonstration, you will learn how to perform image-to-image generation using Flux.1 Kontext and OpenVINO.
14+
15+
Example of model work:
16+
17+
**Input prompt**: *a tiny Yorkshire terrier astronaut hatching from an egg on the moon*
18+
![](https://github.com/user-attachments/assets/11733314-0b31-449c-9885-12ebf6365a58)
19+
20+
The tutorial consists of the following steps:
21+
22+
- Install prerequisites
23+
- Collect Pytorch model pipeline
24+
- Convert model to OpenVINO intermediate representation (IR) format
25+
- Compress weights using NNCF
26+
- Prepare OpenVINO Inference pipeline
27+
- Run Image-to-Image generation
28+
- Launch interactive demo
29+
30+
## Installation Instructions
31+
32+
This is a self-contained example that relies solely on its own code.</br>
33+
We recommend running the notebook in a virtual environment. You only need a Jupyter server to start.
34+
For further details, please refer to [Installation Guide](../../README.md).
35+
36+
<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=5b5a4db0-7875-4bfb-bdbd-01698b5b1a77&file=notebooks/flux.1-kontext/README.md" />

0 commit comments

Comments
 (0)