From b94cd6754ea81441b0cf8be4ef41b66dca742813 Mon Sep 17 00:00:00 2001 From: Alex O'Connell <35843486+acon96@users.noreply.github.com> Date: Thu, 11 Apr 2024 04:55:02 +0000 Subject: [PATCH] UI: Respect model and lora directory settings when downloading files (#5842) --- modules/ui_model_menu.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/ui_model_menu.py b/modules/ui_model_menu.py index 8d6122d2..29f0b926 100644 --- a/modules/ui_model_menu.py +++ b/modules/ui_model_menu.py @@ -287,6 +287,12 @@ def download_model_wrapper(repo_id, specific_file, progress=gr.Progress(), retur yield ("Getting the output folder") output_folder = downloader.get_output_folder(model, branch, is_lora, is_llamacpp=is_llamacpp) + + if output_folder == Path("models"): + output_folder = Path(shared.args.model_dir) + elif output_folder == Path("loras"): + output_folder = Path(shared.args.lora_dir) + if check: progress(0.5)