mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-02-26 23:32:46 +01:00
Don't break if we can't write a file
This commit is contained in:
parent
716f30fecb
commit
45f350239e
@ -282,9 +282,11 @@ 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), "w", encoding="utf-8") as f:
|
||||
f.write(help_file_contents)
|
||||
try:
|
||||
with open(os.path.join(model_dir_path, help_file_name), "w", encoding="utf-8") as f:
|
||||
f.write(help_file_contents)
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
def is_malicious_model(file_path):
|
||||
|
Loading…
Reference in New Issue
Block a user