From 87622238c605c9238f674b5c4cbc8423a4262b23 Mon Sep 17 00:00:00 2001 From: bmaltais Date: Sun, 19 Mar 2023 08:37:28 -0400 Subject: [PATCH] Add option to not train TE in Dreambooth --- README.md | 1 + dreambooth_gui.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5b1fd15..be1b2bc 100644 --- a/README.md +++ b/README.md @@ -191,6 +191,7 @@ This will store your a backup file with your current locally installed pip packa * 2023/03/16 (v21.2.5): - Fix basic captioning logic + - Add possibility to not train TE in Dreamboot by setting `Step text encoder training` to -1. * 2023/03/12 (v21.2.4): - Fix issue with kohya locon not training the convolution layers - Update LyCORIS module version diff --git a/dreambooth_gui.py b/dreambooth_gui.py index dee017c..7d24b70 100644 --- a/dreambooth_gui.py +++ b/dreambooth_gui.py @@ -377,7 +377,9 @@ def train_model( print(f'max_train_steps = {max_train_steps}') # calculate stop encoder training - if stop_text_encoder_training_pct == None: + if int(stop_text_encoder_training_pct) == -1: + stop_text_encoder_training = -1 + elif stop_text_encoder_training_pct == None: stop_text_encoder_training = 0 else: stop_text_encoder_training = math.ceil( @@ -624,7 +626,7 @@ def dreambooth_tab( placeholder='512,512', ) stop_text_encoder_training = gr.Slider( - minimum=0, + minimum=-1, maximum=100, value=0, step=1,