Special thanks to https://github.com/bghira/SimpleTuner/blob/main/documentation/quickstart/FLUX.md for much of this tutorial. A reminder that only basics are covered here.
Deploy and then SSH into the instance with the provided command. Once inside, you may see the following:
Run "sudo reboot". This will restart to the VM. Wait a couple minutes and connect again. Once you are back in run "sudo apt update" and "sudo apt upgrade" in that order. You might come across this screen:
Use your tab key to navigate to "<Ok>" and press enter to continue. Now use
python --version
You should be using python 3.11 or 3.10. Now you should run the following command:
With all this set up, now we can clone the SimpleTuner repository and set up a virtual environment. Run the following commands:
git clone --branch=release https://github.com/bghira/SimpleTuner.git
cd SimpleTuner
# if python --version shows 3.11 you can just also use the 'python' command here.
python3.11 -m venv .venv
source .venv/bin/activate
pip install -U poetry pip
poetry install --no-root
Now that we have our dependencies, we can set up SimpleTuner itself with a configuration process. First create a configure.py file in the SimpleTuner directory copying this one https://github.com/bghira/SimpleTuner/blob/main/configure.py. Run configure.py with
python configure.py
It will ask you a series of questions. All of the actual configuration related questions have default answers. Use the default answers when possible. If you go to /config/config.env your config file should look like this:
After that we can install the data set we will be using. First navigate to your output directory. If you used the defaults in the configuration step, then it should be called:
output/models
Create a file called multidatabackend.json (add this also to the SimpleTuner/config) take note that instance_data_dir will end up being the directory of your dataset and may vary if you input a custom output directory: