feature: added flag, config and ui update for image extension change #1789

This commit is contained in:
eddyizm
2024-01-10 09:36:27 -08:00
parent dc5b5238c8
commit e1697272ec
4 changed files with 20 additions and 2 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ log_cache = {}
def get_current_html_path():
date_string, local_temp_filename, only_name = generate_temp_filename(folder=modules.config.path_outputs,
extension='png')
extension=modules.config.default_image_extension)
html_name = os.path.join(os.path.dirname(local_temp_filename), 'log.html')
return html_name
@@ -22,7 +22,7 @@ def log(img, dic):
if args_manager.args.disable_image_log:
return
date_string, local_temp_filename, only_name = generate_temp_filename(folder=modules.config.path_outputs, extension='png')
date_string, local_temp_filename, only_name = generate_temp_filename(folder=modules.config.path_outputs, extension=modules.config.default_image_extension)
os.makedirs(os.path.dirname(local_temp_filename), exist_ok=True)
Image.fromarray(img).save(local_temp_filename)
html_name = os.path.join(os.path.dirname(local_temp_filename), 'log.html')