mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-06-07 18:37:00 +02: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_name = f"Place your {model_type} model files here.txt"
|
||||||
help_file_contents = f'Supported extensions: {" or ".join(MODEL_EXTENSIONS.get(model_type))}'
|
help_file_contents = f'Supported extensions: {" or ".join(MODEL_EXTENSIONS.get(model_type))}'
|
||||||
|
try:
|
||||||
with open(os.path.join(model_dir_path, help_file_name), "w", encoding="utf-8") as f:
|
with open(os.path.join(model_dir_path, help_file_name), "w", encoding="utf-8") as f:
|
||||||
f.write(help_file_contents)
|
f.write(help_file_contents)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def is_malicious_model(file_path):
|
def is_malicious_model(file_path):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user