Transform your wildest ideas into stunning visuals with the power of FLUX models, now with a friendly Streamlit interface!
MFLUX-UI is your friendly neighborhood image generator that wraps the amazing MFLUX project in a beautiful, easy-to-use web interface! Whether you're an AI art enthusiast, a creative professional, or just someone who loves making cool images, MFLUX-UI has got you covered.
- ๐ผ๏ธ Multiple FLUX Models: Choose from:
- Schnell - Lightning-fast generation (1-10 steps)
- Dev - High-quality results with guidance control
- Kontext - Image-to-image transformations
- ๐๏ธ Real-time Parameter Tuning: Adjust steps, guidance, dimensions, and more!
- ๐พ Smart Output Management: Auto-organized outputs with timestamps
- ๐ง Advanced Options: Quantization, VAE tiling, low-RAM mode
- ๐ Live Generation Progress: Watch your masterpiece come to life!
Before we dive into the fun stuff, make sure you have:
- ๐ macOS with Apple Silicon (M1/M2/M3/M4)
- ๐ Python 3.10 or higher
- ๐พ At least 16GB RAM (32GB+ recommended for best performance)
- ๐๏ธ ~50GB free disk space (for model downloads)
- ๐ค Hugging Face account (free!)
git clone https://github.com/jakkaj/mflux-ui.git
cd mflux-uiWe recommend using a virtual environment to keep things tidy:
# Create a virtual environment
python3 -m venv venv
# Activate it
source venv/bin/activate # On macOS/LinuxThe easiest way is using uv:
# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install MFLUX
uv tool install --upgrade mfluxAlternatively, you can use pip:
pip install mfluxpip install streamlitFirst, create a free account at huggingface.co if you don't have one.
Then, get your access token:
- Go to huggingface.co/settings/tokens
- Create a new token (or use an existing one)
- Copy the token
Set it up in your terminal:
# Option 1: Export as environment variable
export HF_TOKEN="your_token_here"
# Option 2: Use Hugging Face CLI
pip install huggingface-hub
huggingface-cli login
# Paste your token when promptedBefore using FLUX models, you need to accept their licenses on Hugging Face:
- FLUX.1-schnell: Accept here
- FLUX.1-dev: Accept here
Just click "Accept" on each model page while logged into your Hugging Face account.
Fire up the Streamlit interface:
streamlit run runner.pyYour browser should automatically open to http://localhost:8501. If not, just click the link in your terminal!
-
Choose Your Model:
- Schnell: Super fast, great for prototyping
- Dev: Best quality, more control
- Kontext: Upload an image and transform it!
-
Write Your Prompt: Be creative! The more descriptive, the better.
-
Tweak Settings (optional):
- Adjust steps for speed vs quality
- Play with guidance scale (Dev/Kontext only)
- Set custom dimensions
- Use a fixed seed for reproducible results
-
Click Generate and watch the magic happen!
Your creations are saved in the outputs/ directory with descriptive filenames:
schnell_20250702_143022.png- Schnell model outputdev_20250702_143022.png- Dev model outputkontext_20250702_143022.png- Kontext model output
Make sure you've:
- Set up your Hugging Face token
- Accepted the model licenses
- Have enough disk space for downloads
Try:
- Enabling "Low-RAM mode" in the sidebar
- Using higher quantization (6 or 8)
- Reducing image dimensions
- Closing other applications
The first time you use each model, MFLUX downloads it (~30GB each). This is normal! Subsequent runs will be much faster.
Prompt: "A cozy coffee shop on Mars with Earth visible through the window, digital art style"
Steps: 4
Dimensions: 1024x1024
Prompt: "A majestic dragon made of northern lights dancing across a starry sky"
Steps: 20
Guidance: 3.5
Dimensions: 1024x1024
Upload a photo of your pet and try:
Prompt: "Transform into a renaissance painting with ornate golden frame"
Steps: 20
Guidance: 2.5
- MFLUX Project: github.com/filipstrand/mflux
- FLUX Models: Black Forest Labs
- Hugging Face: huggingface.co
- Streamlit Docs: streamlit.io
Found a bug? Have an idea? Feel free to:
- Open an issue
- Submit a pull request
- Share your coolest generated images!
This project wraps MFLUX, which is based on FLUX models. Please respect all applicable licenses:
- MFLUX is under MIT License
- FLUX models have their own licenses (check Hugging Face pages)
- This wrapper is provided as-is for educational and creative purposes
Now go forth and create some amazing images! Remember, the only limit is your imagination (and maybe your GPU memory ๐).
Made with โค๏ธ for the AI art community