From b984a44f476b2da47597e96391cd383ef8012768 Mon Sep 17 00:00:00 2001 From: Juan M Uys Date: Wed, 31 May 2023 02:07:12 +0100 Subject: [PATCH] fix error when downloading a model for the first time (#2404) --- download-model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/download-model.py b/download-model.py index 7a027fe..8577f9a 100644 --- a/download-model.py +++ b/download-model.py @@ -197,7 +197,7 @@ def start_download_threads(file_list, output_folder, start_from_scratch=False, t def download_model_files(model, branch, links, sha256, output_folder, start_from_scratch=False, threads=1): # Creating the folder and writing the metadata if not output_folder.exists(): - output_folder.mkdir() + output_folder.mkdir(parents=True, exist_ok=True) with open(output_folder / 'huggingface-metadata.txt', 'w') as f: f.write(f'url: https://huggingface.co/{model}\n') f.write(f'branch: {branch}\n')