Merge pull request #1823 from d8ahazard/main

Don't break if we can't write a file
This commit is contained in:
cmdr2 2024-07-24 09:48:30 +05:30 committed by GitHub
commit 1cc7c1afa0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 5 deletions

1
.github/FUNDING.yml vendored
View File

@ -1,4 +1,3 @@
# These are supported funding model platforms # These are supported funding model platforms
ko_fi: easydiffusion ko_fi: easydiffusion
patreon: easydiffusion

View File

@ -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 Exception as e:
log.exception(e)
def is_malicious_model(file_path): def is_malicious_model(file_path):

View File

@ -268,7 +268,7 @@
<option value="unipc_tu_2" class="k_diffusion-only">UniPC TU 2</option> <option value="unipc_tu_2" class="k_diffusion-only">UniPC TU 2</option>
<option value="unipc_tq" class="k_diffusion-only">UniPC TQ</option> <option value="unipc_tq" class="k_diffusion-only">UniPC TQ</option>
</select> </select>
<a href="https://github.com/easydiffusion/easydiffusion/wiki/How-to-Use#samplers" target="_blank"><i class="fa-solid fa-circle-question help-btn"><span class="simple-tooltip top-left">Click to learn more about samplers</span></i></a> <a href="https://github.com/easydiffusion/easydiffusion/wiki/Samplers" target="_blank"><i class="fa-solid fa-circle-question help-btn"><span class="simple-tooltip top-left">Click to learn more about samplers</span></i></a>
</td></tr> </td></tr>
<tr class="pl-5"><td><label>Image Size: </label></td><td id="image-size-options"> <tr class="pl-5"><td><label>Image Size: </label></td><td id="image-size-options">
<select id="width" name="width" value="512"> <select id="width" name="width" value="512">