Go to file
Damian Stewart a6610625eb Squashed commit of the following:
commit 0f890f2d6bbccee225f738934f4c4450323f19a2
Merge: c008c40 003b089
Author: Damian Stewart <d@damianstewart.com>
Date:   Sun May 14 11:47:40 2023 +0200

    Merge remote-tracking branch 'upstream/main' into feat_te_last_n_layers_unsquashed

commit c008c404f19ebc6b78085f42a4e39aeb2ba00d04
Author: Damian Stewart <d@damianstewart.com>
Date:   Sun May 14 11:23:20 2023 +0200

    finalize TE layer freezing

commit 7377b10d59e32a6fea5d321a598ae4504e1a9f36
Author: Damian Stewart <d@damianstewart.com>
Date:   Thu May 11 20:45:28 2023 +0200

    remove zero_lr method

commit 4af13ba816c2811d7b5bd6fbb81a32bca6747e99
Author: Damian Stewart <d@damianstewart.com>
Date:   Thu May 11 20:05:01 2023 +0200

    Revert "rename parameters"

    This reverts commit aa33c61337599ab2d90b34aaf8c3d36fd4edf147.

commit aa33c61337599ab2d90b34aaf8c3d36fd4edf147
Author: Damian Stewart <d@damianstewart.com>
Date:   Tue May 9 00:28:00 2023 +0200

    rename parameters

commit 1da867e6fadb873da2571371a73b522406d76a18
Author: Damian Stewart <d@damianstewart.com>
Date:   Sun May 7 22:28:29 2023 +0200

    remove silly check

commit 483cb2a635c3fe5a044edf4ea8de095bedc3f0ac
Author: Damian Stewart <d@damianstewart.com>
Date:   Sun May 7 20:53:43 2023 +0200

    use 1e-10 not 0 as 'zero' lr

commit e5d230e6c765a7e25dc6381d09bd0a66a9a54ec2
Author: Damian Stewart <d@damianstewart.com>
Date:   Sun May 7 20:51:51 2023 +0200

    add experimental 'zero_lr' freeze method

commit bcf24ee59a443c0ee71d622e65e1043b547f845e
Author: Damian Stewart <d@damianstewart.com>
Date:   Sun May 7 17:32:11 2023 +0200

    fix layer selection bug

commit 7ee33eff8740e095f85042dcbb792e025b179c6c
Author: Damian Stewart <d@damianstewart.com>
Date:   Sun May 7 17:25:25 2023 +0200

    put back the 'drop' method and make accessible

commit 76dfbf6dd6f43f3aa9a7f4629baa8e86573d9520
Author: Damian Stewart <d@damianstewart.com>
Date:   Sun May 7 16:39:05 2023 +0200

    wip getting final_layer_norm to work

commit a19d43651a87525251106ed57238cd2cd1c3f3ff
Author: Damian Stewart <d@damianstewart.com>
Date:   Sun May 7 16:15:53 2023 +0200

    work around a crash when freeze_final_layer_norm is True

commit c2a44eb25132941b92e2ecd0be3682ae3c6838c2
Author: Damian Stewart <d@damianstewart.com>
Date:   Sun May 7 15:47:10 2023 +0200

    improve logging, add extra freezing controls

commit a31e64c4c0d12dfb6583dd6f22c8c09ba7840410
Author: Damian Stewart <d@damianstewart.com>
Date:   Sun May 7 13:46:38 2023 +0200

    alternative method to freeze early TE layers

commit 095692fd4ea53707c012217898321860d8b9329f
Merge: 876072c 4c5ce81
Author: Damian Stewart <d@damianstewart.com>
Date:   Sun May 7 11:52:51 2023 +0200

    Merge branch 'victorchall:main' into feat_te_last_n_layers

commit 876072c46394fde721a6026f7a6ef72ccb150ddb
Author: Damian Stewart <d@damianstewart.com>
Date:   Sun May 7 01:41:50 2023 +0200

    implement last N layers training only for TE
2023-05-16 13:57:05 -04:00
.devcontainer Split requirements between build and runtime 2023-04-01 00:29:10 +02:00
.github unittest workflow fix maybe 2023-04-22 18:56:51 -04:00
cfgs update coco example cfg 2023-02-25 16:37:10 -05:00
data Merge remote-tracking branch 'upstream/main' into val_partial_epochs 2023-05-07 02:11:58 +02:00
doc fix typo 2023-05-16 13:54:42 -04:00
docker Update LD_LIBRARY_PATH env on startup 2023-05-08 15:16:19 -04:00
optimizer Squashed commit of the following: 2023-05-16 13:57:05 -04:00
scripts early iter on txt2img script for testing on remote instances 2023-01-23 16:51:00 -05:00
test Always convert YAML tags to strings 2023-04-23 00:36:32 +02:00
utils more wip optimizer splitting 2023-05-04 20:15:36 -04:00
.gitignore support for saving the optimizer state 2023-04-13 22:31:22 -05:00
.pylintrc gitignore 2022-12-17 22:34:07 -05:00
LICENSE update license for 2023 2023-01-27 13:59:02 -05:00
LICENSE_AGPL update license for 2023 2023-01-27 13:59:02 -05:00
README.md add vast-runpod video links to main readme 2023-04-15 14:25:39 -04:00
Train_Colab.ipynb remove amp from notebook, deprecated 2023-04-30 09:30:55 -04:00
Train_JupyterLab.ipynb Add lion lib and speed test 2023-04-14 00:59:26 +02:00
activate_venv.bat hey look ed2 2022-12-17 22:32:48 -05:00
caption.py caption thing 2023-03-25 20:17:56 -04:00
chain.bat update ed1 mode 2023-01-09 13:44:51 -05:00
chain0.json chaining and more lowers resolutions 2023-01-08 18:52:39 -05:00
chain1.json chaining and more lowers resolutions 2023-01-08 18:52:39 -05:00
chain2.json chaining and more lowers resolutions 2023-01-08 18:52:39 -05:00
optimizer.json Squashed commit of the following: 2023-05-16 13:57:05 -04:00
requirements-test.txt test reqs 2023-05-08 18:25:37 -04:00
sample_prompts.json Update sample_prompts.json 2023-02-27 19:57:08 -06:00
sample_prompts.txt hey look ed2 2022-12-17 22:32:48 -05:00
train.json check if your git commit is out of date 2023-04-29 18:15:25 -04:00
train.py Squashed commit of the following: 2023-05-16 13:57:05 -04:00
trainSD21.json fix clip_skip default in trainSD21.json and update other params 2023-04-19 10:47:02 +02:00
validation_default.json update docs for every_n_epochs 2023-05-07 12:05:49 +02:00
windows_setup.cmd use compel for sample prompting; enable clip skip for samples 2023-04-14 19:12:06 +02:00

README.md

EveryDream Trainer 2.0

Welcome to v2.0 of EveryDream trainer! Now with more Diffusers, faster, and even more features!

For the most up to date news and community discussions, please join us on Discord!

Discord!

If you find this tool useful, please consider subscribing to the project on Patreon or a one-time donation on Ko-fi. Your donations keep this project alive as a free open source tool with ongoing enhancements.

Patreon or Kofi.

If you're coming from Dreambooth, please read this for an explanation of why EveryDream is not Dreambooth.

Requirements

Windows 10/11, Linux (Ubuntu 20.04+ recommended), or use the linux Docker container

Python 3.10.x

Nvidia GPU with 11GB VRAM or more (note: 1080 Ti and 2080 Ti may require compiling xformers yourself)

16GB system RAM recommended minimum

Single GPU is currently supported

32GB of system RAM recommended for 50k+ training images, but may get away with sufficient swap file and 16GB

Ampere or newer 24GB+ (3090/A5000/4090, etc) recommended for 10k+ images

...Or use any computer with a web browser and run on Vast/Colab. See Cloud section below.

Video tutorials

Basic setup and getting started

Covers install, setup of base models, startning training, basic tweaking, and looking at your logs

Multiaspect and crop jitter explainer

Behind the scenes look at how the trainer handles multiaspect and crop jitter

Companion tools repo

Make sure to check out the tools repo, it has a grab bag of scripts to help with your data curation prior to training. It has automatic bulk BLIP captioning for BLIP, script to web scrape based on Laion data files, script to rename generic pronouns to proper names or append artist tags to your captions, etc.

Cloud/Docker

Free tier Google Colab notebook

* RunPod / Vast Instructions

* Vast.ai Video Tutorial

Runpod Video Tutorial

Docker image link

Docs

Setup and installation

Download and setup base models

Data Preparation

Training - How to start training

Troubleshooting

Basic Tweaking - Important args to understand to get started

Advanced Tweaking and Advanced Optimizer Tweaking

Chaining training sessions - Modify training parameters by chaining training sessions together end to end

Shuffling Tags

Data Balancing - Includes my small treatise on model "preservation" with additional ground truth data

Logging

Validation - Use a validation split on your data to see when you are overfitting and tune hyperparameters

Contributing