From b40fb3a422472fc0fb4e2d68edf9876e8bd881dc Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Fri, 9 Dec 2022 15:27:40 +0530 Subject: [PATCH] Model readme file write flag --- ui/sd_internal/model_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/sd_internal/model_manager.py b/ui/sd_internal/model_manager.py index 21acb540..c7d22e1d 100644 --- a/ui/sd_internal/model_manager.py +++ b/ui/sd_internal/model_manager.py @@ -96,7 +96,7 @@ def make_model_folders(): help_file_name = f'Place your {model_type} model files here.txt' help_file_contents = f'Supported extensions: {" or ".join(MODEL_EXTENSIONS.get(model_type))}' - with open(os.path.join(model_dir_path, help_file_name)) as f: + with open(os.path.join(model_dir_path, help_file_name), 'w', encoding='utf-8') as f: f.write(help_file_contents) def is_malicious_model(file_path):