diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e227d2ab..d122a9785 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,9 +3,10 @@ ## Update for 2023-10-06 **TBD**: Candidates before release: -- Implement Lyco for *backend:diffusers* -- Note: Free-U requires diffusers main branch, will be included in next release +- Note: Free-U requires unreleased diffusers +- Update Lora handler for *backend:diffusers* - Implement styles extra field +- Merge parallel batch processing This is a big one, with some major changes and new functionality... And probably the biggest release since introduction of **Diffusers** diff --git a/extensions-builtin/sd-extension-system-info b/extensions-builtin/sd-extension-system-info index 2fd1fcd9d..c1f2b8d85 160000 --- a/extensions-builtin/sd-extension-system-info +++ b/extensions-builtin/sd-extension-system-info @@ -1 +1 @@ -Subproject commit 2fd1fcd9d2353809f875fca1b6164630100f8087 +Subproject commit c1f2b8d8570d7c46338b4192a3ebac5946dd894f diff --git a/javascript/black-teal.css b/javascript/black-teal.css index b7d4ea1e6..b502b53c0 100644 --- a/javascript/black-teal.css +++ b/javascript/black-teal.css @@ -31,7 +31,7 @@ --radius-sm: 2px; --radius-lg: 4px; --spacing-md: 4px; - --spacing-xxl: 8px; + --spacing-xxl: 6px; --line-sm: 1.2em; --line-md: 1.4em; } @@ -101,6 +101,7 @@ svg.feather.feather-image, .feather .feather-image { display: none } #img2img_label_copy_to_img2img { font-weight: normal; } #txt2img_prompt, #txt2img_neg_prompt, #img2img_prompt, #img2img_neg_prompt { background-color: var(--background-color); box-shadow: 4px 4px 4px 0px #333333 !important; } #txt2img_prompt > label > textarea, #txt2img_neg_prompt > label > textarea, #img2img_prompt > label > textarea, #img2img_neg_prompt > label > textarea { font-size: 1.0em; line-height: 1.4em; } +#txt2img_styles, #img2img_styles { margin-top: -10px; margin-left: -10px; width: 100px; } #img2img_settings { min-width: calc(2 * var(--left-column)); max-width: calc(2 * var(--left-column)); background-color: #111111; padding-top: 16px; } #interrogate, #deepbooru { margin: 0 0px 10px 0px; max-width: 80px; max-height: 80px; font-weight: normal; font-size: 0.95em; } #quicksettings .gr-button-tool { font-size: 1.6rem; box-shadow: none; margin-left: -20px; margin-top: -2px; height: 2.4em; } diff --git a/javascript/style.css b/javascript/style.css index afdf698ba..00558c637 100644 --- a/javascript/style.css +++ b/javascript/style.css @@ -26,7 +26,7 @@ tr { border-bottom: none !important; padding: 0.1em 0.5em !important; } .gradio-button.tool { max-width: min-content; min-width: min-content !important; align-self: end; font-size: 1.4em; color: var(--body-text-color) !important; margin-bottom: var(--spacing-md); } .gradio-checkbox { margin: 0.75em 1.5em 0 0; align-self: center; } .gradio-column { min-width: unset !important; } -.gradio-container { max-width: unset !important; padding: 8px !important; } +.gradio-container { max-width: unset !important; padding: var(--block-label-padding) !important; } .gradio-container .prose a, .gradio-container .prose a:visited{ color: unset; text-decoration: none; } .gradio-dropdown { margin-right: var(--spacing-sm) !important; } @@ -100,7 +100,7 @@ div#extras_scale_to_tab div.form{ flex-direction: row; } /* settings */ #si-sparkline-memo, #si-sparkline-load { background-color: #111; } -#quicksettings { width: fit-content; margin-top: 1em; } +#quicksettings { width: fit-content; } #quicksettings > button { padding: 0 1em 0 0; align-self: end; margin-bottom: var(--text-lg); } #settings { display: flex; gap: var(--layout-gap); } #settings div { border: none; gap: 0; margin: 0 0 var(--layout-gap) 0px; padding: 0; } diff --git a/modules/ui_train.py b/modules/ui_train.py index c2d1cc7c7..97437dfc9 100644 --- a/modules/ui_train.py +++ b/modules/ui_train.py @@ -56,7 +56,7 @@ def create_ui(txt2img_preview_params): preprocess_txt_action = gr.Dropdown(label='Existing caption text action', value="ignore", choices=["ignore", "copy", "prepend", "append"]) with gr.Box(): - gr.Markdown('## Preprocessing steps') + gr.HTML('

Preprocessing steps

') process_keep_original_size = gr.Checkbox(label='Keep original size') process_keep_channels = gr.Checkbox(label='Keep original image channels') process_flip = gr.Checkbox(label='Create flipped copies') @@ -78,7 +78,7 @@ def create_ui(txt2img_preview_params): process_focal_crop_debug = gr.Checkbox(label='Create debug image') with gr.Column(visible=False) as process_multicrop_col: - gr.Markdown('## Each image is center-cropped with an automatically chosen width and height.') + gr.HTML('

Each image is center-cropped with an automatically chosen width and height

') with gr.Row(): process_multicrop_mindim = gr.Slider(minimum=64, maximum=2048, step=8, label="Dimension lower bound", value=384) process_multicrop_maxdim = gr.Slider(minimum=64, maximum=2048, step=8, label="Dimension upper bound", value=768) @@ -137,7 +137,7 @@ def create_ui(txt2img_preview_params): def get_textual_inversion_template_names(): return sorted(textual_inversion.textual_inversion_templates) - gr.Markdown('## Select existing embedding to continue training or create a new one') + gr.HTML('

Select existing embedding to continue training or create a new one

') with FormRow(): with gr.Column(): with gr.Row(): @@ -152,7 +152,7 @@ def create_ui(txt2img_preview_params): ti_create = gr.Button(value="Create embedding", variant='secondary') with gr.Box(): - gr.Markdown('## Training parameters') + gr.HTML('

Training parameters

') ti_learn_rate = gr.Textbox(label='Embedding Learning rate', placeholder="Embedding Learning rate", value="0.005") with FormRow(): ti_clip_grad_mode = gr.Dropdown(value="disabled", label="Gradient Clipping", choices=["disabled", "value", "norm"]) @@ -162,7 +162,7 @@ def create_ui(txt2img_preview_params): ti_steps = gr.Number(label='Max steps', value=1000, precision=0) with gr.Box(): - gr.Markdown('## Training images') + gr.HTML('

Training images

') ti_dataset_directory = gr.Textbox(label='Dataset directory', placeholder="Path to directory with input images") with FormRow(): ti_varsize = gr.Checkbox(label="Do not resize images", value=False) @@ -171,7 +171,7 @@ def create_ui(txt2img_preview_params): ti_use_weight = gr.Checkbox(label="Use PNG alpha channel as loss weight", value=False) with gr.Box(): - gr.Markdown('## Dataset processing') + gr.HTML('

Dataset processing

') with FormRow(): ti_template = gr.Dropdown(label='Prompt template', value="style_filewords.txt", choices=get_textual_inversion_template_names()) create_refresh_button(ti_template, textual_inversion.list_textual_inversion_templates, lambda: {"choices": get_textual_inversion_template_names()}, "refrsh_train_template_file") @@ -180,7 +180,7 @@ def create_ui(txt2img_preview_params): ti_latent_sampling_method = gr.Radio(label='Choose latent sampling method', value="once", choices=['once', 'deterministic', 'random']) with gr.Box(): - gr.Markdown('## Training outputs') + gr.HTML('

Training outputs

') with FormRow(): ti_create_every = gr.Number(label='Create interim images', value=500, precision=0) ti_save_every = gr.Number(label='Create interim embeddings', value=500, precision=0) @@ -243,7 +243,7 @@ def create_ui(txt2img_preview_params): with gr.Tab(label="Train hypernetwork", id="train_hypernetwork_tab") as tab_hn: tab_hn.select(fn=lambda: train_tab_change('hn'), inputs=[], outputs=[action_pp, action_ti, action_hn]) - gr.Markdown('## Select existing embedding to continue training or create a new one') + gr.HTML('

Select existing hypernetwork to continue training or create a new one

') with FormRow(): with gr.Column(): with FormRow(): @@ -264,7 +264,7 @@ def create_ui(txt2img_preview_params): hn_create = gr.Button(value="Create hypernetwork", variant='secondary') with gr.Box(): - gr.Markdown('## Training parameters') + gr.HTML('

Training parameters

') hn_learn_rate = gr.Textbox(label='Hypernetwork Learning rate', placeholder="Hypernetwork Learning rate", value="0.00001") with FormRow(): hn_clip_grad_mode = gr.Dropdown(value="disabled", label="Gradient Clipping", choices=["disabled", "value", "norm"]) @@ -274,7 +274,7 @@ def create_ui(txt2img_preview_params): hn_steps = gr.Number(label='Max steps', value=1000, precision=0) with gr.Box(): - gr.Markdown('## Training images') + gr.HTML('

Training images

') hn_dataset_directory = gr.Textbox(label='Dataset directory', placeholder="Path to directory with input images") with FormRow(): hn_varsize = gr.Checkbox(label="Do not resize images", value=False) @@ -283,7 +283,7 @@ def create_ui(txt2img_preview_params): hn_use_weight = gr.Checkbox(label="Use PNG alpha channel as loss weight", value=False) with gr.Box(): - gr.Markdown('## Dataset processing') + gr.HTML('

Dataset processing

') with FormRow(): hn_template = gr.Dropdown(label='Prompt template', value="style_filewords.txt", choices=get_textual_inversion_template_names()) create_refresh_button(hn_template, textual_inversion.list_textual_inversion_templates, lambda: {"choices": get_textual_inversion_template_names()}, "refrsh_train_template_file") @@ -292,7 +292,7 @@ def create_ui(txt2img_preview_params): hn_latent_sampling_method = gr.Radio(label='Choose latent sampling method', value="once", choices=['once', 'deterministic', 'random']) with gr.Box(): - gr.Markdown('## Training outputs') + gr.HTML('

Training outputs

') with FormRow(): hn_create_every = gr.Number(label='Create interim images', value=500, precision=0) hn_save_every = gr.Number(label='Create interim hypernetworks', value=500, precision=0)