Skip to content

Commit 6395fdc

Browse files
committed
[ADDED] FP16 subfolder check
On some systems durning installation of SD-1.5 Controlnet-ReferenceOnly model, the FP16 folder is not created resulting in a early exit.
1 parent e1474d7 commit 6395fdc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

model_setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ def download_quantized_models(repo_id, model_fp16, model_int8):
7474
#print("download_folder", download_folder)
7575

7676
FP16_model = os.path.join(download_folder, "FP16")
77+
# on some systems, the FP16 subfolder is not created resulting in a installation crash
78+
if not os.path.isdir(FP16_model):
79+
os.mkdir(FP16_model)
7780
shutil.copytree(download_folder, SD_path_FP16, ignore=shutil.ignore_patterns('FP16', 'INT8'))
7881
shutil.copytree(FP16_model, SD_path_FP16, dirs_exist_ok=True)
7982

0 commit comments

Comments
 (0)