0

Image inpainting and outpainting with FLUX.1 Fill

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

Example · مثال

Content

Image inpainting and outpainting with FLUX.1 Fill

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. FLUX.1 Fill introduces advanced inpainting capabilities that surpass existing approaches. It allows for seamless edits that integrate naturally with existing images.

Additionally, FLUX.1 Fill supports outpainting, enabling the user to extend images beyond their original borders.

You can find more details about the model in blog post and model card

In this tutorial, we consider how to convert and optimize FLUX.1 Fill for performing image editing using text prompt and binary mask. You will learn how to convert model using Optimum Intel, optimize it using NNCF and run with OpenVINO GenAI

Notebook Contents

In this demonstration, you will learn how to perform inpainting and outpainting using Flux.1 and OpenVINO.

Example of model work:

The tutorial consists of the following steps:

  • Install prerequisites
  • Collect Pytorch model pipeline
  • Convert model to OpenVINO intermediate representation (IR) format
  • Compress weights using NNCF
  • Prepare OpenVINO Inference pipeline
  • Run model
  • Launch interactive demo

Installation Instructions

This is a self-contained example that relies solely on its own code.</br> We recommend running the notebook in a virtual environment. You only need a Jupyter server to start. For further details, please refer to [Installation Guide](../../README.md).

Source and license

Source
Intel OpenVINO Notebooks
Original
openvinotoolkit/openvino_notebooks/notebooks/flux-fill
License
Apache-2.0