Skip to content

Commit 7dae63e

Browse files
authored
Merge pull request #2048 from bmaltais/dev
v23.0.1
2 parents 686990f + 8c760b5 commit 7dae63e

30 files changed

+245
-114
lines changed

.release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v23.0.0
1+
v23.0.1

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ The GUI allows you to set the training parameters and generate and run the requi
3737
- [No module called tkinter](#no-module-called-tkinter)
3838
- [SDXL training](#sdxl-training)
3939
- [Change History](#change-history)
40+
- [2024/03/10 (v23.0.1)](#20240310-v2301)
4041
- [2024/03/02 (v23.0.0)](#20240302-v2300)
4142

4243
## 🦒 Colab
@@ -363,6 +364,11 @@ The documentation in this section will be moved to a separate document later.
363364

364365
## Change History
365366

367+
### 2024/03/10 (v23.0.1)
368+
369+
- Update bitsandbytes module to 0.43.0 as it provide native windows support
370+
- Minor fixes to code
371+
366372
### 2024/03/02 (v23.0.0)
367373

368374
- Use sd-scripts release [0.8.4](https://github.com/kohya-ss/sd-scripts/releases/tag/v0.8.4) post commit [fccbee27277d65a8dcbdeeb81787ed4116b92e0b](https://github.com/kohya-ss/sd-scripts/commit/fccbee27277d65a8dcbdeeb81787ed4116b92e0b)

kohya_gui/basic_caption_gui.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def list_images_dirs(path):
111111
# Dropdown for image folder
112112
images_dir = gr.Dropdown(
113113
label='Image folder to caption (containing the images to caption)',
114-
choices=list_images_dirs(default_images_dir),
114+
choices=[""] + list_images_dirs(default_images_dir),
115115
value="",
116116
interactive=True,
117117
allow_custom_value=True,
@@ -198,7 +198,7 @@ def list_images_dirs(path):
198198

199199
# Event handler for dynamic update of dropdown choices
200200
images_dir.change(
201-
fn=lambda path: gr.Dropdown().update(choices=list_images_dirs(path)),
201+
fn=lambda path: gr.Dropdown().update(choices=[""] + list_images_dirs(path)),
202202
inputs=images_dir,
203203
outputs=images_dir,
204204
show_progress=False,

kohya_gui/blip_caption_gui.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def list_train_dirs(path):
9898
with gr.Group(), gr.Row():
9999
train_data_dir = gr.Dropdown(
100100
label="Image folder to caption (containing the images to caption)",
101-
choices=list_train_dirs(default_train_dir),
101+
choices=[""] + list_train_dirs(default_train_dir),
102102
value="",
103103
interactive=True,
104104
allow_custom_value=True,
@@ -171,7 +171,7 @@ def list_train_dirs(path):
171171
)
172172

173173
train_data_dir.change(
174-
fn=lambda path: gr.Dropdown().update(choices=list_train_dirs(path)),
174+
fn=lambda path: gr.Dropdown().update(choices=[""] + list_train_dirs(path)),
175175
inputs=train_data_dir,
176176
outputs=train_data_dir,
177177
show_progress=False,

kohya_gui/class_advanced_training.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def list_vae_files(path):
5353
self.vae = gr.Dropdown(
5454
label='VAE (Optional. path to checkpoint of vae to replace for training)',
5555
interactive=True,
56-
choices=list_vae_files(current_vae_dir),
56+
choices=[""] + list_vae_files(current_vae_dir),
5757
value="",
5858
allow_custom_value=True,
5959
)
@@ -68,7 +68,7 @@ def list_vae_files(path):
6868
)
6969

7070
self.vae.change(
71-
fn=lambda path: gr.Dropdown().update(choices=list_vae_files(path)),
71+
fn=lambda path: gr.Dropdown().update(choices=[""] + list_vae_files(path)),
7272
inputs=self.vae,
7373
outputs=self.vae,
7474
show_progress=False,
@@ -306,7 +306,7 @@ def list_state_dirs(path):
306306

307307
self.resume = gr.Dropdown(
308308
label='Resume from saved training state (path to "last-state" state folder)',
309-
choices=list_state_dirs(current_state_dir),
309+
choices=[""] + list_state_dirs(current_state_dir),
310310
value="",
311311
interactive=True,
312312
allow_custom_value=True,
@@ -321,7 +321,7 @@ def list_state_dirs(path):
321321
show_progress=False,
322322
)
323323
self.resume.change(
324-
fn=lambda path: gr.Dropdown().update(choices=list_state_dirs(path)),
324+
fn=lambda path: gr.Dropdown().update(choices=[""] + list_state_dirs(path)),
325325
inputs=self.resume,
326326
outputs=self.resume,
327327
show_progress=False,

kohya_gui/class_configuration_file.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def __init__(self, headless=False, output_dir: gr.Dropdown = None):
1313

1414
def update_configs(output_dir):
1515
self.output_dir = output_dir
16-
return gr.Dropdown().update(choices=list(list_files(output_dir, exts=[".json"], all=True)))
16+
return gr.Dropdown().update(choices=[""] + list(list_files(output_dir, exts=[".json"], all=True)))
1717

1818
def list_configs(path):
1919
self.output_dir = path
@@ -23,7 +23,7 @@ def list_configs(path):
2323
with gr.Row():
2424
self.config_file_name = gr.Dropdown(
2525
label='Load/Save Config file',
26-
choices=list_configs(self.output_dir),
26+
choices=[""] + list_configs(self.output_dir),
2727
value="",
2828
interactive=True,
2929
allow_custom_value=True,
@@ -47,7 +47,7 @@ def list_configs(path):
4747
)
4848

4949
self.config_file_name.change(
50-
fn=lambda path: gr.Dropdown().update(choices=list_configs(path)),
50+
fn=lambda path: gr.Dropdown().update(choices=[""] + list_configs(path)),
5151
inputs=self.config_file_name,
5252
outputs=self.config_file_name,
5353
show_progress=False,

kohya_gui/class_folders.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def list_logging_dirs(path):
4141
with gr.Row():
4242
self.output_dir = gr.Dropdown(
4343
label=f'Output folder to output trained model',
44-
choices=list_output_dirs(default_output_dir),
44+
choices=[""] + list_output_dirs(default_output_dir),
4545
value="",
4646
interactive=True,
4747
allow_custom_value=True,
@@ -58,7 +58,7 @@ def list_logging_dirs(path):
5858

5959
self.reg_data_dir = gr.Dropdown(
6060
label='Regularisation folder (Optional. containing reqularization images)' if not finetune else 'Train config folder (Optional. where config files will be saved)',
61-
choices=list_data_dirs(default_reg_data_dir),
61+
choices=[""] + list_data_dirs(default_reg_data_dir),
6262
value="",
6363
interactive=True,
6464
allow_custom_value=True,
@@ -75,7 +75,7 @@ def list_logging_dirs(path):
7575
with gr.Row():
7676
self.logging_dir = gr.Dropdown(
7777
label='Logging folder (Optional. to enable logging and output Tensorboard log)',
78-
choices=list_logging_dirs(default_logging_dir),
78+
choices=[""] + list_logging_dirs(default_logging_dir),
7979
value="",
8080
interactive=True,
8181
allow_custom_value=True,
@@ -91,19 +91,19 @@ def list_logging_dirs(path):
9191
)
9292

9393
self.output_dir.change(
94-
fn=lambda path: gr.Dropdown().update(choices=list_output_dirs(path)),
94+
fn=lambda path: gr.Dropdown().update(choices=[""] + list_output_dirs(path)),
9595
inputs=self.output_dir,
9696
outputs=self.output_dir,
9797
show_progress=False,
9898
)
9999
self.reg_data_dir.change(
100-
fn=lambda path: gr.Dropdown().update(choices=list_data_dirs(path)),
100+
fn=lambda path: gr.Dropdown().update(choices=[""] + list_data_dirs(path)),
101101
inputs=self.reg_data_dir,
102102
outputs=self.reg_data_dir,
103103
show_progress=False,
104104
)
105105
self.logging_dir.change(
106-
fn=lambda path: gr.Dropdown().update(choices=list_logging_dirs(path)),
106+
fn=lambda path: gr.Dropdown().update(choices=[""] + list_logging_dirs(path)),
107107
inputs=self.logging_dir,
108108
outputs=self.logging_dir,
109109
show_progress=False,

kohya_gui/class_source_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def list_train_dirs(path):
114114
with gr.Column(), gr.Row():
115115
self.train_data_dir = gr.Dropdown(
116116
label='Image folder (containing training images subfolders)' if not finetuning else 'Image folder (containing training images)',
117-
choices=list_train_dirs(default_train_dir),
117+
choices=[""] + list_train_dirs(default_train_dir),
118118
value="",
119119
interactive=True,
120120
allow_custom_value=True,
@@ -182,7 +182,7 @@ def list_train_dirs(path):
182182
)
183183

184184
self.train_data_dir.change(
185-
fn=lambda path: gr.Dropdown().update(choices=list_train_dirs(path)),
185+
fn=lambda path: gr.Dropdown().update(choices=[""] + list_train_dirs(path)),
186186
inputs=self.train_data_dir,
187187
outputs=self.train_data_dir,
188188
show_progress=False,

kohya_gui/convert_lcm_gui.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def list_save_to(path):
9494
model_path = gr.Dropdown(
9595
label="Stable Diffusion model to convert to LCM",
9696
interactive=True,
97-
choices=list_models(current_model_dir),
97+
choices=[""] + list_models(current_model_dir),
9898
value="",
9999
allow_custom_value=True,
100100
)
@@ -115,7 +115,7 @@ def list_save_to(path):
115115
name = gr.Dropdown(
116116
label="Name of the new LCM model",
117117
interactive=True,
118-
choices=list_save_to(current_save_dir),
118+
choices=[""] + list_save_to(current_save_dir),
119119
value="",
120120
allow_custom_value=True,
121121
)
@@ -133,13 +133,13 @@ def list_save_to(path):
133133
show_progress=False,
134134
)
135135
model_path.change(
136-
fn=lambda path: gr.Dropdown().update(choices=list_models(path)),
136+
fn=lambda path: gr.Dropdown().update(choices=[""] + list_models(path)),
137137
inputs=model_path,
138138
outputs=model_path,
139139
show_progress=False,
140140
)
141141
name.change(
142-
fn=lambda path: gr.Dropdown().update(choices=list_save_to(path)),
142+
fn=lambda path: gr.Dropdown().update(choices=[""] + list_save_to(path)),
143143
inputs=name,
144144
outputs=name,
145145
show_progress=False,

kohya_gui/convert_model_gui.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def list_target_folder(path):
202202
source_model_input = gr.Dropdown(
203203
label='Source model (path to source model folder of file to convert...)',
204204
interactive=True,
205-
choices=list_source_model(default_source_model),
205+
choices=[""] + list_source_model(default_source_model),
206206
value="",
207207
allow_custom_value=True,
208208
)
@@ -233,7 +233,7 @@ def list_target_folder(path):
233233
)
234234

235235
source_model_input.change(
236-
fn=lambda path: gr.Dropdown().update(choices=list_source_model(path)),
236+
fn=lambda path: gr.Dropdown().update(choices=[""] + list_source_model(path)),
237237
inputs=source_model_input,
238238
outputs=source_model_input,
239239
show_progress=False,
@@ -255,7 +255,7 @@ def list_target_folder(path):
255255
target_model_folder_input = gr.Dropdown(
256256
label='Target model folder (path to target model folder of file name to create...)',
257257
interactive=True,
258-
choices=list_target_folder(default_target_folder),
258+
choices=[""] + list_target_folder(default_target_folder),
259259
value="",
260260
allow_custom_value=True,
261261
)
@@ -273,7 +273,7 @@ def list_target_folder(path):
273273
)
274274

275275
target_model_folder_input.change(
276-
fn=lambda path: gr.Dropdown().update(choices=list_target_folder(path)),
276+
fn=lambda path: gr.Dropdown().update(choices=[""] + list_target_folder(path)),
277277
inputs=target_model_folder_input,
278278
outputs=target_model_folder_input,
279279
show_progress=False,

0 commit comments

Comments
 (0)