Skip to content

Commit b467738

Browse files
committed
flux fill notebook
1 parent 7609a71 commit b467738

File tree

3 files changed

+1172
-0
lines changed

3 files changed

+1172
-0
lines changed

notebooks/flux-fill/README.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Image inpainting and outpainting with FLUx.1 Fill
2+
3+
inpainting is the task of replacing or editing a specific area of the input image. This makes it a useful tool for image restoration like removing defects and artifacts, or even replacing an image area with something entirely new. Inpainting relies on a mask to determine which regions of an image to fill in; the area to inpaint is represented by white pixels and the area to keep is represented by black pixels. The white pixels are filled in by the prompt.
4+
FLUX.1 Fill introduces advanced inpainting capabilities that surpass existing approaches. It allows for seamless edits that integrate naturally with existing images.
5+
6+
![](https://github.com/user-attachments/assets/3598a8e1-526b-4571-8d73-200dcde92430)
7+
8+
Additionally, FLUX.1 Fill supports outpainting, enabling the user to extend images beyond their original borders.
9+
10+
![](https://github.com/user-attachments/assets/0e195ef2-fc5d-4eca-b32f-08cdd646199f)
11+
12+
You can find more details about the model in [blog post](https://blackforestlabs.ai/flux-1-tools/) and [model card](https://huggingface.co/black-forest-labs/FLUX.1-Fill-dev)
13+
14+
In this tutorial, we consider how to convert and optimize FLUX.1 Fill for performing image editing using text prompt and binary mask.
15+
16+
### Notebook Contents
17+
18+
In this demonstration, you will learn how to perform inpainting and outpainting using Flux.1 and OpenVINO.
19+
20+
Example of model work:
21+
22+
![](https://github.com/user-attachments/assets/2cc19c7c-2d68-4a33-b143-226319888bd6)
23+
24+
The tutorial consists of the following steps:
25+
26+
- Install prerequisites
27+
- Collect Pytorch model pipeline
28+
- Convert model to OpenVINO intermediate representation (IR) format
29+
- Compress weights using NNCF
30+
- Prepare OpenVINO Inference pipeline
31+
- Run model
32+
- Launch interactive demo
33+
34+
## Installation Instructions
35+
36+
This is a self-contained example that relies solely on its own code.</br>
37+
We recommend running the notebook in a virtual environment. You only need a Jupyter server to start.
38+
For further details, please refer to [Installation Guide](../../README.md).
39+
40+
<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=5b5a4db0-7875-4bfb-bdbd-01698b5b1a77&file=notebooks/flux-fill/README.md" />

0 commit comments

Comments
 (0)