UI: Respect model and lora directory settings when downloading files (#5842)

This commit is contained in:
Alex O'Connell 2024-04-11 04:55:02 +00:00 committed by GitHub
parent 17c4319e2d
commit b94cd6754e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -287,6 +287,12 @@ def download_model_wrapper(repo_id, specific_file, progress=gr.Progress(), retur
yield ("Getting the output folder") yield ("Getting the output folder")
output_folder = downloader.get_output_folder(model, branch, is_lora, is_llamacpp=is_llamacpp) 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: if check:
progress(0.5) progress(0.5)