Generator requires your computer to have at least Nvidia RTX3050 performance, 8GB or more video memory graphics card. If you do not have a graphics card that meets the requirements, do not install the Generator, just use the API.
For Windows OS,Please search python3.11 in windows store and install it.
For Linux ,Please search installation method by yourself, or refer to the official website.
https://www.python.org/downloads/
Download the newest generator.zip in the page: https://github.com/tonera/fluxsd/releases and unzip it.
wget https://github.com/tonera/fluxsd/releases/download/{version}/generator.zip
unzip generator.zip
cd generator
Download generator.zip from https://github.com/tonera/fluxsd/releases and unzip the file. And then , open a terminal window of PowerShell in the package folder.
cd generator
python -m venv .venv
. .venv/bin/activate
or
python3 -m venv .venv
. .venv/bin/activate
python -m venv .venv
.venv/Scripts/activate
It is possible that you will encounter an error message that the.ps1 file cannot be loaded because Windows security policies prevent the script from running and you need to execute it as an administrator
Set-ExecutionPolicy Unrestricted
pip install -r requirement.txt
.venv\Lib\site-packages\basicsr\data\degradations.py Modify the line 8
from torchvision.transforms.functional_tensor import rgb_to_grayscale
Be changed to:
from torchvision.transforms.functional import rgb_to_grayscale
Open https://pytorch.org/ and select options based on your actual configuration. Finally you will get the generated installation script.
For example, if the CUDA driver version of the graphics card is 12.4, run the following command to install it
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
How to check your CUDA version?
nvidia-smi
Open your fluxsd, open the configuration page, copy Configuration -> Image Model -> Local -> Image Generator configuration file, copy the contents of the textarea to the mk_config.ini file in the Generator's config folder.
python Service_atz2.py base
Download url: https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors
Move the model file to Generator's models folder.
Like this:
generator/models/sd_xl_base_1.0.safetensors
Now, you can open http://{Your ip}:8000 and generate images using the model in FluxSD.
INFO OSError: [WinError 126] The specified module could not be found... "... \ lib \ site - packages \ torch \ lib \ fbgemm DLL "
Download the file "libomp140.x86_64.dll" https://www.dllme.com/dll/files/libomp140_x86_64/00637fe34a6043031c9ae4c6cf0a891d/download And save it to /Windows/system32 directory.