A lightweight, decoupled Gradio interface for running FLUX.2-dev locally with full VRAM management.
This model is extremely resource-intensive. Please ensure your hardware meets the minimum requirements:
- Text Encoder: Requires at least 15 GB VRAM (loaded on CUDA:0).
- FLUX.2 Model: Requires at least 20 GB VRAM (loaded on CUDA:1 or separate).
- Total System: A multi-GPU setup or a single GPU with massive VRAM (e.g., A6000/A100) is recommended.
- Note: Using input images (Image-to-Image) will require additional VRAM beyond these minimums.
You must create your own Python environment (Conda or venv) and install dependencies suitable for your specific hardware (CUDA version, PyTorch, etc.). This repo does not provide an automatic installer.
Recommended packages include:
torchdiffuserstransformersgradiohuggingface_hubfacexlib(if using specific tools)
The environment must be activated via the startup script.
- Open
run_flux_fast.batin a text editor. - Locate the line:
call "C:\path\to\anaconda3\Scripts\activate.bat" your_env_name
- Edit this line to point to your actual Conda/Python activation script and your created environment name.
- Double-click
run_flux_fast.bat. - The Gradio UI will launch in your browser.
- Click "Load Models (Start Worker)": This launches the separate worker process and loads the heavy models into VRAM.
- Generate: Enter your prompt and settings.
- Click "Unload Models (Kill Worker)": This completely kills the worker process, ensuring 100% of VRAM is freed immediately.
- Model Card: black-forest-labs/FLUX.2-dev