Flux Image Generator is a Streamlit web application that enables users to generate images using the Flux AI model. This powerful tool offers a user-friendly interface for creating images based on text prompts, with a standout feature of batch image generation. Users can efficiently produce multiple images simultaneously, streamlining the creative process and saving valuable time.
- Choose between different Flux models
- Generate images from text prompts
- Upload a file with multiple prompts
- Customize generation parameters (seed, number of outputs, aspect ratio, etc.)
- Download individual images or all generated images in a zip file
- Logging for better debugging and monitoring
- Python 3.9+
- Streamlit
- Replicate
- Pillow
- Requests
- Other dependencies listed in
requirements.txt
-
Clone this repository:
git clone https://github.com/nicekate/flux-image-generator.git cd flux-image-generator
-
Install the required packages:
pip install -r requirements.txt
-
Set up your Replicate API token:
For Linux and macOS:
export REPLICATE_API_TOKEN=your_api_token_here
For Windows (Command Prompt):
set REPLICATE_API_TOKEN=your_api_token_here
For Windows (PowerShell):
$env:REPLICATE_API_TOKEN = "your_api_token_here"
-
Run the Streamlit app:
streamlit run app.py
-
Open your web browser and go to the URL displayed in the terminal (usually
http://localhost:8501
). -
Use the interface to select a model, enter prompts, and generate images.
- Select the Flux model you want to use from the dropdown menu.
- Enter a text prompt describing the image you want to generate, or upload a text file with multiple prompts (one per line).
- (Optional) Expand the "Advanced Settings" section to adjust parameters like random seed, number of outputs, aspect ratio, output format, and quality.
- Click the "Generate Images" button to start the image generation process.
- View the generated images on the page. You can download individual images or all images as a zip file.
- If you encounter API errors, make sure you have set the
REPLICATE_API_TOKEN
environment variable correctly. - Check the application logs for more detailed error messages and debugging information.
Contributions to improve the Flux Image Generator are welcome. Please feel free to submit pull requests or open issues to suggest improvements or report bugs.
[MIT License]