Skip to content

Commit

Permalink
Minor updates to UI
Browse files Browse the repository at this point in the history
  • Loading branch information
bmaltais committed Mar 7, 2024
1 parent 3119096 commit 62008f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
12 changes: 1 addition & 11 deletions kohya_gui/class_lora_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self, train_data_dir=None, reg_data_dir=None, output_dir=None, logg
self.headless = headless

gr.Markdown(
'This section provide LoRA tools to help setup your dataset...'
'This section provide various LoRA tools...'
)
gradio_extract_dylora_tab(headless=headless)
gradio_convert_lcm_tab(headless=headless)
Expand All @@ -32,13 +32,3 @@ def __init__(self, train_data_dir=None, reg_data_dir=None, output_dir=None, logg
gradio_svd_merge_lora_tab(headless=headless)
gradio_resize_lora_tab(headless=headless)
gradio_verify_lora_tab(headless=headless)
if train_data_dir is not None:
with gr.Tab('Dataset Preparation'):
gradio_dreambooth_folder_creation_tab(
train_data_dir_input=train_data_dir,
reg_data_dir_input=reg_data_dir,
output_dir_input=output_dir,
logging_dir_input=logging_dir,
headless=headless,
)
gradio_dataset_balancing_tab(headless=headless)
7 changes: 3 additions & 4 deletions kohya_gui/class_sample_images.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import tempfile
import os
import gradio as gr
from easygui import msgbox
Expand Down Expand Up @@ -33,7 +32,7 @@ def run_cmd_sample(

run_cmd = ''

if sample_every_n_epochs == 0 and sample_every_n_steps == 0:
if sample_every_n_epochs == sample_every_n_steps == 0:
return run_cmd

# Create the prompt file and get its path
Expand All @@ -45,10 +44,10 @@ def run_cmd_sample(
run_cmd += f' --sample_sampler={sample_sampler}'
run_cmd += f' --sample_prompts="{sample_prompts_path}"'

if not sample_every_n_epochs == 0:
if sample_every_n_epochs != 0:
run_cmd += f' --sample_every_n_epochs="{sample_every_n_epochs}"'

if not sample_every_n_steps == 0:
if sample_every_n_steps != 0:
run_cmd += f' --sample_every_n_steps="{sample_every_n_steps}"'

return run_cmd
Expand Down

0 comments on commit 62008f4

Please sign in to comment.