diff --git a/kohya_gui/class_source_model.py b/kohya_gui/class_source_model.py index ddab2ddae..4b081f677 100644 --- a/kohya_gui/class_source_model.py +++ b/kohya_gui/class_source_model.py @@ -102,6 +102,9 @@ def list_dataset_config_dirs(path: str) -> list: with gr.Accordion("Model", open=True): with gr.Column(), gr.Group(): + model_ext = gr.Textbox(value="*.safetensors *.ckpt", visible=False) + model_ext_name = gr.Textbox(value="Model types", visible=False) + # Define the input elements with gr.Row(): with gr.Column(), gr.Row(): @@ -129,7 +132,7 @@ def list_dataset_config_dirs(path: str) -> list: ) self.pretrained_model_name_or_path_file.click( get_file_path, - inputs=self.pretrained_model_name_or_path, + inputs=[self.pretrained_model_name_or_path, model_ext, model_ext_name], outputs=self.pretrained_model_name_or_path, show_progress=False, )