anything-v4.5-pruned.safetensors
brew install pyenv
Add these 3 lines to your ~/.bashrc
or ~/.zshrc
Ref: https://github.com/pyenv/pyenv#set-up-your-shell-environment-for-pyenv
git clone https://github.com/kohya-ss/sd-scripts
cd sd-scripts
After the installation finishes, run python --version
and it should return 3.10.6
.
Then open requirements.txt
and add a #
at the start of tensorflow==2.10.1
This prevents pip from installing the tensorflow that does not work on MacOS. (In the previous step, we've already installed tensorflow for MacOS.)
Note that you might see it complains it cannot install tensorflow correctly or tensorboard version not match. Just ignore it.
(optional) To use Lion as the optimiser, you need to install it by running pip install lion_pytorch
.
Prepare your datasets and the config file.
For more information about the config file, please see: https://github.com/kohya-ss/sd-scripts/blob/main/train_README-ja.md#step-2-設定ファイルの記述
This colab is also a great reference of writing the config file: https://github.com/Linaqruf/kohya-trainer/blob/main/kohya-LoRA-dreambooth.ipynb
Here's my config.toml
file for your reference.
You are all set!
Then just run the command below, under the sd-scripts
root directory.
For more available args, please see: the https://github.com/kohya-ss/sd-scripts/blob/main/train_network_README-ja.md
Again, this colab is a great reference for setting up your args: https://github.com/Linaqruf/kohya-trainer/blob/main/kohya-LoRA-dreambooth.ipynb
Here's mine, just for your reference:
Let's train =)