How to setup Text to Image generation wish Diffusion models (Flux)

Stable Diffusion is the technology to produce images from a text description. this technology forms the basis of the FLUX models. This guide explains how you can setup text to image generation in Ozeki AI studio using a FLUX model.

Recommended hardware:

To use image generation it is recommended to use a GPU.

Download the required models from:

https://huggingface.co/second-state/FLUX.1-dev-GGUF/tree/main

Save the files to:

  • Flux model: C:\AIModels\flux1-dev-Q5_1.gguff
  • ClipModelPath: C:\AIModels\clip_l.safetensors
  • T5xxlModelPath: C:\AIModels\t5xxl_fp16.safetensors
  • AEModelPath: C:\AIModels\ae.safetensors

Background information

When using Flux for text-to-image generation, each model plays a unique role in creating high-quality images:

CLIP Model: This model is used to encode the text input, capturing key features and semantic information. It helps the system understand the context and details of the text prompt.

T5XXL Model: This large language model processes the text input to expand or refine the descriptions, providing richer semantic information. It enhances the text understanding, making the generated images more accurate and detailed

AE Model (Autoencoder): The AE model, often referred to as a VAE (Variational Autoencoder), is used for generating the actual images It takes the processed text information and converts it into a visual representation

Flux Model: The Flux model integrates and orchestrates all these models, ensuring they work together seamlessly.

By combining these models, Flux can create more comprehensive and accurate text-to-image representations. It ensures that the generated images closely match the text descriptions while maintaining a balance between creativity and adherence to the prompts.

Download the required models

Download model files
Figure 1 - Download model files

Copy model files to C:\AIModels folder
Figure 2 - Copy model files to C:\AIModels folder

Create Diffusion model in Ozeki AI Studio

Open AI studio
Figure 3 - Open AI studio

Create new Diffusion AI model
Figure 4 - Create new Diffusion AI model

Set model files to Diffusion AI model
Figure 5 - Set model files to Diffusion AI model

Create chatbot in Ozeki AI Studio

Create new AI chatbot
Figure 6 - Create new AI chatbot

Set AI model for chatbot
Figure 7 - Set AI model for chatbot

Chatbot created
Figure 8 - Chatbot created

Generate image with chatbot

Open chatbot
Figure 9 - Open chatbot

Send prompt for generate image
Figure 10 - Send prompt for generate image

Image generated
Figure 11 - Image generated

Register MyOzeki user and add AI bot as friend

Create new myozeki account
Figure 12 - Create new myozeki account

Provide account details
Figure 13 - Provide account details

Open chat app
Figure 14 - Open chat app

Add new friend
Figure 15 - Add new friend

Add AI bot as frined
Figure 16 - Add AI bot as frined

AI bot at friend list
Figure 17 - AI bot at friend list

Generate image from MyOzeki chat

Open AI chatbot
Figure 18 - Open AI chatbot

Assign chat account to the chatbot
Figure 19 - Assign chat account to the chatbot

Send message from MyOzeki to the chatbot
Figure 20 - Send message from MyOzeki to the chatbot

Generated image received from the chatbot
Figure 21 - Generated image received from the chatbot

More information