YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Simple Flux
Simple Flux offers a lightweight web interface to Flux using Gradio.
Hardware & software requirements
Tested on Ubuntu with NVIVIA RTX 4090 and GTX 1070 (8GB GPU RAM).
GPU Memory
If your GPU has less than 16GB GPU memory, you need to specify --low_mem when you start the script. Max GPU memory consumption that was observed when --low_mem was specified was 5.88GB, so 6GB GPU RAM may work.
System RAM
Tested on 64GB RAM hosts. I learned from a user that he/she was able to run it with 40GB RAM on Windows 11. It is unclear if you can run it on a machine with less RAM than that.
How to install Simple Flux
Currently, only systems with NVIDIA GPU and CUDA are supported. I am using Linux and these steps have not been tested on Windows yet.
Overview
- Copy files from github
- Set up virtual environment
- Install Pytorch
- Install other python packages
Steps
Copy files from github
Open the terminal and go to a directory that you want to install Simple Flux. Type:
git clone https://github.com/HowToSD/simple_flux.gitSet up virtual environment
Run the following. Note that if your system does not have python, you need to install it first.
python3 -m venv simpleflux source simpleflux/bin/activate # On Windows use `simpleflux\Scripts\activate`Install Pytorch
ensure pip and setuptools are up to date:
pip install --upgrade pip setuptoolsInstall torch
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121For more information, refer to the installation section at https://pytorch.org/.
Install other python packages
pip install -r requirements.txtStart Simple Flux Type:
python simple_flux.pyIf you have low GPU memory, type:
python simple_flux.py --low_memThis should start Gradio.
Using your browser, access the URL displayed in the above.
How to run simple_flux in Docker with nvidia GPU
install nvidia-container-toolkit
Build Docker image
docker build -t simple_flux_app:0.0.3 .Run container (it takes long to download models, use later if you already have locally downloaded models):
docker run -p 7860:7860 --gpus all simple_flux_app:0.0.3or, if you have huggingface models in cache (no need to download them anymore)
docker run -v ~/.cache/huggingface/hub:/root/.cache/huggingface/hub -p 7860:7860 --gpus all simple_flux_app:0.0.3