Skip to content

Commit

Permalink
Fix warning about dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
bmaltais committed Apr 15, 2024
1 parent a22d462 commit e519ffe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions kohya_gui/class_advanced_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,11 +454,13 @@ def full_options_update(full_fp16, full_bf16):
self.save_state = gr.Checkbox(
label="Save training state",
value=self.config.get("advanced.save_state", False),
info="Save training state (including optimizer states etc.) when saving models"
)

self.save_state_on_train_end = gr.Checkbox(
label="Save training state at end of training",
value=self.config.get("advanced.save_state_on_train_end", False),
info="Save training state (including optimizer states etc.) on train end"
)

def list_state_dirs(path):
Expand All @@ -472,6 +474,7 @@ def list_state_dirs(path):
value=self.config.get("advanced.state_dir", ""),
interactive=True,
allow_custom_value=True,
info="Saved state to resume training from"
)
create_refresh_button(
self.resume,
Expand Down
2 changes: 1 addition & 1 deletion kohya_gui/class_basic_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def init_training_controls(self) -> None:
# Initialize the caption extension input
self.caption_extension = gr.Dropdown(
label="Caption file extension",
choices=[".cap", ".caption", ".txt"],
choices=["", ".cap", ".caption", ".txt"],
value=".txt",
interactive=True,
)
Expand Down
1 change: 1 addition & 0 deletions kohya_gui/convert_model_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ def list_target_folder(path):
"runwayml/stable-diffusion-v1-5",
"CompVis/stable-diffusion-v1-4",
],
allow_custom_value=True,
)
with gr.Group(), gr.Row():
with gr.Column(), gr.Row():
Expand Down

0 comments on commit e519ffe

Please sign in to comment.