-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from bghira/main
release
- Loading branch information
Showing
14 changed files
with
1,159 additions
and
489 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
## Setup | ||
|
||
1. Clone the repository and install the dependencies: | ||
|
||
```bash | ||
git clone https://github.com/bghira/SimpleTuner --branch release | ||
python -m venv .venv | ||
pip3 install -U poetry pip | ||
poetry install | ||
``` | ||
|
||
You will need to install some Linux-specific dependencies (Ubuntu is used here): | ||
|
||
```bash | ||
apt -y install nvidia-cuda-dev nvidia-cuda-toolkit | ||
``` | ||
|
||
If you get an error about missing cudNN library, you will want to install torch manually (replace 118 with your CUDA version if not using 11.8): | ||
|
||
```bash | ||
pip3 install xformers torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118 --force | ||
``` | ||
|
||
Alternatively, Pytorch Nightly may be used (Torch 2.1) with Xformers 0.0.21dev (note that this includes torchtriton now): | ||
|
||
```bash | ||
pip3 install --pre torch torchvision torchaudio torchtriton --extra-index-url https://download.pytorch.org/whl/nightly/cu118 --force | ||
pip3 install --pre https://github.com/facebookresearch/xformers.git@main\#egg=xformers | ||
``` | ||
|
||
If the egg install for Xformers does not work, try including `xformers` on the first line, and run only that: | ||
|
||
```bash | ||
pip3 install --pre xformers torch torchvision torchaudio torchtriton --extra-index-url https://download.pytorch.org/whl/nightly/cu118 --force | ||
``` | ||
|
||
2. For SD2.1, copy `sd21-env.sh.example` to `env.sh` - be sure to fill out the details. Try to change as little as possible. | ||
|
||
For SDXL, copy `sdxl-env.sh.example` to `sdxl-env.sh` and then fill in the details. | ||
|
||
For both training scripts, any missing values from your user config will fallback to the defaults. | ||
|
||
3. If you are using `--report_to='wandb'` (the default), the following will help you report your statistics: | ||
|
||
```bash | ||
wandb login | ||
``` | ||
|
||
Follow the instructions that are printed, to locate your API key and configure it. | ||
|
||
Once that is done, any of your training sessions and validation data will be available on Weights & Biases. | ||
|
||
4. For SD2.1, run the `training.sh` script, probably by redirecting the output to a log file: | ||
|
||
```bash | ||
bash training.sh > /path/to/training-$(date +%s).log 2>&1 | ||
``` | ||
|
||
For SDXL, run the `train_sdxl.sh` script, redirecting outputs to the log file: | ||
|
||
```bash | ||
bash train_sdxl.sh > /path/to/training-$(date +%s).log 2>&1 | ||
``` |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.