Flux is an AI image generation model developed by Black Forest Labs. It represents a significant advancement in AI-generated art, utilizing a hybrid architecture of multimodal and parallel diffusion transformer blocks and scaled to 12B parameter. The model offers state-of-the-art performance image generation with top-of-the-line prompt following, visual quality, image detail, and output diversity. More information about the model can be found in blog post and original repo.
In this tutorial, we consider how to convert and optimize Flux.1 model using OpenVINO.
Note: Some demonstrated models can require at least 32GB RAM for conversion and running.
In this demonstration, you will learn how to perform text-to-image generation using Flux.1 and OpenVINO.
Example of model work:
Input prompt: a tiny Yorkshire terrier astronaut hatching from an egg on the moon
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 Text-to-Image generation
- Launch interactive demo
This is a self-contained example that relies solely on its own code.
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.