aboutsummaryrefslogtreecommitdiffstats
path: root/modules/ui.py
diff options
context:
space:
mode:
authorMuhammad Rizqi Nur <rizqinur2010@gmail.com>2022-10-28 02:44:56 +0000
committerMuhammad Rizqi Nur <rizqinur2010@gmail.com>2022-10-28 02:44:56 +0000
commit2a25729623717cc499e873752d9f4ebebd1e1078 (patch)
tree335327c8f1cae38dfca999ef88f5ce3289ed95b1 /modules/ui.py
parent737eb28faca8be2bb996ee0930ec77d1f7ebd939 (diff)
downloadstable-diffusion-webui-gfx803-2a25729623717cc499e873752d9f4ebebd1e1078.tar.gz
stable-diffusion-webui-gfx803-2a25729623717cc499e873752d9f4ebebd1e1078.tar.bz2
stable-diffusion-webui-gfx803-2a25729623717cc499e873752d9f4ebebd1e1078.zip
Gradient clipping in train tab
Diffstat (limited to 'modules/ui.py')
-rw-r--r--modules/ui.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/ui.py b/modules/ui.py
index 0a63e357..97de7da2 100644
--- a/modules/ui.py
+++ b/modules/ui.py
@@ -1313,6 +1313,9 @@ def create_ui(wrap_gradio_gpu_call):
training_width = gr.Slider(minimum=64, maximum=2048, step=64, label="Width", value=512)
training_height = gr.Slider(minimum=64, maximum=2048, step=64, label="Height", value=512)
steps = gr.Number(label='Max steps', value=100000, precision=0)
+ with gr.Row():
+ clip_grad_mode = gr.Dropdown(value="disabled", label="Gradient Clipping", choices=["disabled", "value", "norm"])
+ clip_grad_value = gr.Number(value=1.0, show_label=False)
create_image_every = gr.Number(label='Save an image to log directory every N steps, 0 to disable', value=500, precision=0)
save_embedding_every = gr.Number(label='Save a copy of embedding to log directory every N steps, 0 to disable', value=500, precision=0)
save_image_with_stored_embedding = gr.Checkbox(label='Save images with embedding in PNG chunks', value=True)
@@ -1406,6 +1409,8 @@ def create_ui(wrap_gradio_gpu_call):
training_width,
training_height,
steps,
+ clip_grad_mode,
+ clip_grad_value,
create_image_every,
save_embedding_every,
template_file,
@@ -1431,6 +1436,8 @@ def create_ui(wrap_gradio_gpu_call):
training_width,
training_height,
steps,
+ clip_grad_mode,
+ clip_grad_value,
create_image_every,
save_embedding_every,
template_file,