kohya_ss/kohya_gui
bmaltais 51d87f5309
feat: Remember last used folder for file dialogs (#3290)
* feat: Remember last used folder for file dialogs

This commit introduces a feature to remember the last used folder for various file and folder dialogs within the GUI.

Key changes:

- Modified `KohyaSSGUIConfig` (`kohya_gui/class_gui_config.py`) to store and retrieve a `last_used_folder` value in the `config.toml` file.
- Updated file/folder dialog utility functions in `kohya_gui/common_gui.py` (e.g., `get_folder_path`, `get_file_path`, `get_saveasfilename_path`) to:
    - Accept the `KohyaSSGUIConfig` instance.
    - Use the stored `last_used_folder` as the initial directory for dialogs.
    - Update `last_used_folder` after a successful selection.
- Updated various GUI modules (`class_folders.py`, `wd14_caption_gui.py`, and other captioning utilities) to pass the `KohyaSSGUIConfig` instance to these dialog functions.

This enhancement improves your experience by defaulting file dialogs to the most recently accessed relevant directory, streamlining the workflow for you when you frequently work with specific folders.

* Fix typo

* Fix typos

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-06-16 07:39:29 -04:00
..
__init__.py move gui related files to kohya_gui/ 2024-02-27 21:54:38 +09:00
basic_caption_gui.py feat: Remember last used folder for file dialogs (#3290) 2025-06-16 07:39:29 -04:00
blip2_caption_gui.py feat: Remember last used folder for file dialogs (#3290) 2025-06-16 07:39:29 -04:00
blip_caption_gui.py feat: Remember last used folder for file dialogs (#3290) 2025-06-16 07:39:29 -04:00
class_accelerate_launch.py v25.0.0 release (#3138) 2025-03-28 11:00:44 -04:00
class_advanced_training.py v25.0.0 release (#3138) 2025-03-28 11:00:44 -04:00
class_basic_training.py Feat/add max grad norm dreambooth (#3251) 2025-05-25 17:44:03 -04:00
class_command_executor.py v25.0.0 release (#3138) 2025-03-28 11:00:44 -04:00
class_configuration_file.py Adding support for more config.toml values 2024-04-03 22:19:57 -04:00
class_flux1.py v25.0.3 2025-03-28 17:46:38 -04:00
class_folders.py feat: Remember last used folder for file dialogs (#3290) 2025-06-16 07:39:29 -04:00
class_gui_config.py feat: Remember last used folder for file dialogs (#3290) 2025-06-16 07:39:29 -04:00
class_huggingface.py Add huggingface parms to config file 2024-04-14 22:03:36 -04:00
class_lora_tab.py v25.0.0 release (#3138) 2025-03-28 11:00:44 -04:00
class_metadata.py Add support for metadata parameters (#2295) 2024-04-15 13:26:39 -04:00
class_sample_images.py v25.0.0 release (#3138) 2025-03-28 11:00:44 -04:00
class_sd3.py v25.0.0 release (#3138) 2025-03-28 11:00:44 -04:00
class_sdxl_parameters.py v25.0.0 release (#3138) 2025-03-28 11:00:44 -04:00
class_source_model.py Fix issue with v_param when SDXL is selected 2025-04-05 08:47:35 -04:00
class_tensorboard.py v25.0.0 release (#3138) 2025-03-28 11:00:44 -04:00
common_gui.py feat: Remember last used folder for file dialogs (#3290) 2025-06-16 07:39:29 -04:00
convert_lcm_gui.py Fix issue with tensorboard 2024-05-09 13:20:20 -04:00
convert_model_gui.py Fix issue with tensorboard 2024-05-09 13:20:20 -04:00
custom_logging.py Format with black 2024-04-03 18:32:25 -04:00
dataset_balancing_gui.py v25.0.0 release (#3138) 2025-03-28 11:00:44 -04:00
dreambooth_folder_creation_gui.py Fix tkinter issue for headless 2024-04-15 14:07:08 -04:00
dreambooth_gui.py Feat/add max grad norm dreambooth (#3251) 2025-05-25 17:44:03 -04:00
extract_lora_from_dylora_gui.py Fix issue with tensorboard 2024-05-09 13:20:20 -04:00
extract_lora_gui.py v25.0.0 release (#3138) 2025-03-28 11:00:44 -04:00
extract_lycoris_locon_gui.py Fix issue with tensorboard 2024-05-09 13:20:20 -04:00
finetune_gui.py Fix logic issues 2025-05-03 11:20:08 -04:00
flux_extract_lora_gui.py v25.0.0 release (#3138) 2025-03-28 11:00:44 -04:00
flux_merge_lora_gui.py v25.0.0 release (#3138) 2025-03-28 11:00:44 -04:00
git_caption_gui.py feat: Remember last used folder for file dialogs (#3290) 2025-06-16 07:39:29 -04:00
group_images_gui.py Fix issue with tensorboard 2024-05-09 13:20:20 -04:00
localization.py update file read and write to utf-8 2024-04-19 10:50:43 -04:00
localization_ext.py update file read and write to utf-8 2024-04-19 10:50:43 -04:00
lora_gui.py Feat: Add logging for effective learning rates in LoRA GUI 2025-06-01 13:59:07 +00:00
manual_caption_gui.py feat: Remember last used folder for file dialogs (#3290) 2025-06-16 07:39:29 -04:00
merge_lora_gui.py v25.0.0 release (#3138) 2025-03-28 11:00:44 -04:00
merge_lycoris_gui.py Fix issue with tensorboard 2024-05-09 13:20:20 -04:00
resize_lora_gui.py Fix issue with tensorboard 2024-05-09 13:20:20 -04:00
sd_modeltype.py v25.0.0 release (#3138) 2025-03-28 11:00:44 -04:00
svd_merge_lora_gui.py Fix issue with tensorboard 2024-05-09 13:20:20 -04:00
textual_inversion_gui.py Fix logic issues 2025-05-03 11:20:08 -04:00
utilities.py feat: Remember last used folder for file dialogs (#3290) 2025-06-16 07:39:29 -04:00
verify_lora_gui.py Fix issue with tensorboard 2024-05-09 13:20:20 -04:00
wd14_caption_gui.py feat: Remember last used folder for file dialogs (#3290) 2025-06-16 07:39:29 -04:00