diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-01-04 16:57:02 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-04 16:57:02 +0000 |
commit | 9092e1ca7756642692197316d3dec47c23322381 (patch) | |
tree | 22f5d5e7417f24599a415fd64c9f1652495ce5a3 /modules/ui.py | |
parent | b7deea47eeb033052062621b0005d4321b53bff7 (diff) | |
parent | eeb1de4388773ba92b9920a4f64eb91add2e02ca (diff) | |
download | stable-diffusion-webui-gfx803-9092e1ca7756642692197316d3dec47c23322381.tar.gz stable-diffusion-webui-gfx803-9092e1ca7756642692197316d3dec47c23322381.tar.bz2 stable-diffusion-webui-gfx803-9092e1ca7756642692197316d3dec47c23322381.zip |
Merge pull request #3842 from R-N/gradient-clipping
Gradient clipping in train tab
Diffstat (limited to 'modules/ui.py')
-rw-r--r-- | modules/ui.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/ui.py b/modules/ui.py index 184af7ad..72e7b7d2 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -1290,6 +1290,10 @@ def create_ui(): with gr.Row():
embedding_learn_rate = gr.Textbox(label='Embedding Learning rate', placeholder="Embedding Learning rate", value="0.005", elem_id="train_embedding_learn_rate")
hypernetwork_learn_rate = gr.Textbox(label='Hypernetwork Learning rate', placeholder="Hypernetwork Learning rate", value="0.00001", elem_id="train_hypernetwork_learn_rate")
+
+ with gr.Row():
+ clip_grad_mode = gr.Dropdown(value="disabled", label="Gradient Clipping", choices=["disabled", "value", "norm"])
+ clip_grad_value = gr.Textbox(placeholder="Gradient clip value", value="0.1", show_label=False)
batch_size = gr.Number(label='Batch size', value=1, precision=0, elem_id="train_batch_size")
gradient_step = gr.Number(label='Gradient accumulation steps', value=1, precision=0, elem_id="train_gradient_step")
@@ -1402,6 +1406,8 @@ def create_ui(): training_width,
training_height,
steps,
+ clip_grad_mode,
+ clip_grad_value,
shuffle_tags,
tag_drop_out,
latent_sampling_method,
@@ -1431,6 +1437,8 @@ def create_ui(): training_width,
training_height,
steps,
+ clip_grad_mode,
+ clip_grad_value,
shuffle_tags,
tag_drop_out,
latent_sampling_method,
|