diff options
| author | Volpeon <git@volpeon.ink> | 2023-01-02 17:10:28 +0100 |
|---|---|---|
| committer | Volpeon <git@volpeon.ink> | 2023-01-02 17:10:28 +0100 |
| commit | 1fdf3688a30a9370761b148c42c5653124f735d9 (patch) | |
| tree | 05439b535372bdc09b642b93616585e9901e3aa3 | |
| parent | Fix (diff) | |
| download | textual-inversion-diff-1fdf3688a30a9370761b148c42c5653124f735d9.tar.gz textual-inversion-diff-1fdf3688a30a9370761b148c42c5653124f735d9.tar.bz2 textual-inversion-diff-1fdf3688a30a9370761b148c42c5653124f735d9.zip | |
Save args before training, too
| -rw-r--r-- | train_dreambooth.py | 4 | ||||
| -rw-r--r-- | train_ti.py | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/train_dreambooth.py b/train_dreambooth.py index 05f6cb5..cd0bf67 100644 --- a/train_dreambooth.py +++ b/train_dreambooth.py | |||
| @@ -955,6 +955,10 @@ def main(): | |||
| 955 | ) | 955 | ) |
| 956 | global_progress_bar.set_description("Total progress") | 956 | global_progress_bar.set_description("Total progress") |
| 957 | 957 | ||
| 958 | save_args(basepath, args, { | ||
| 959 | "global_step": global_step + global_step_offset | ||
| 960 | }) | ||
| 961 | |||
| 958 | try: | 962 | try: |
| 959 | for epoch in range(num_epochs): | 963 | for epoch in range(num_epochs): |
| 960 | if accelerator.is_main_process: | 964 | if accelerator.is_main_process: |
diff --git a/train_ti.py b/train_ti.py index 5cbef06..6c74854 100644 --- a/train_ti.py +++ b/train_ti.py | |||
| @@ -903,6 +903,10 @@ def main(): | |||
| 903 | ) | 903 | ) |
| 904 | global_progress_bar.set_description("Total progress") | 904 | global_progress_bar.set_description("Total progress") |
| 905 | 905 | ||
| 906 | save_args(basepath, args, { | ||
| 907 | "global_step": global_step + global_step_offset | ||
| 908 | }) | ||
| 909 | |||
| 906 | try: | 910 | try: |
| 907 | for epoch in range(num_epochs): | 911 | for epoch in range(num_epochs): |
| 908 | if accelerator.is_main_process: | 912 | if accelerator.is_main_process: |
