Skip to content

FelippeChemello/modal_flux.1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FLUX.1 Image Generation

This project provides a FastAPI-based web service that uses the FLUX.1 model to generate images from text prompts. The service is built on the modal.com.

Installation

To install the project, clone the repository and install the dependencies:

git clone git@github.com:FelippeChemello/modal_flux.1.git
cd modal_flux.1
pip install -r requirements.txt

Usage

Setup modal.com

To use the service, you need to have a modal.com and run the following command to set up modal.com CLI:

modal setup

on modal.com create a secret called flux.1-secret and set the value of API_KEY to a random string that will be used to authenticate the requests.

Development

To run the service in development mode, use the following command:

modal serve app.py

Deployment

To deploy the service, use the following command:

modal deploy app.py --name flux1

API

When deployed, modal.com will provide a URL for the service. The service has a single endpoint that accepts GET requests:

GET /?prompt=<text>&width=<width>&height=<height>
x-api-key: <API_KEY>

The prompt parameter is the text prompt that will be used to generate the image. The width and height parameters are the dimensions of the image. The X-API-KEY header must be set to the value of the API_KEY secret created in modal.com.

The response will be a PNG image generated by the FLUX.1 model.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages