mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-12-23 23:49:11 +01:00
Allow both embedding metadata and saving metadata files (#1058)
* Allow both embedding metadata and saving metadata files * Use the correct variable * Descriptive variable --------- Co-authored-by: cmdr2 <shashank.shekhar.global@gmail.com>
This commit is contained in:
parent
044e3746ca
commit
e5a47ac964
@ -47,14 +47,16 @@ def save_images_to_disk(images: list, filtered_images: list, req: GenerateImageR
|
||||
output_quality=task_data.output_quality,
|
||||
output_lossless=task_data.output_lossless,
|
||||
)
|
||||
if task_data.metadata_output_format.lower() in ["json", "txt", "embed"]:
|
||||
save_dicts(
|
||||
metadata_entries,
|
||||
save_dir_path,
|
||||
file_name=make_filename,
|
||||
output_format=task_data.metadata_output_format,
|
||||
file_format=task_data.output_format,
|
||||
)
|
||||
if task_data.metadata_output_format:
|
||||
for metadata_output_format in task_data.metadata_output_format.split(','):
|
||||
if metadata_output_format.lower() in ["json", "txt", "embed"]:
|
||||
save_dicts(
|
||||
metadata_entries,
|
||||
save_dir_path,
|
||||
file_name=make_filename,
|
||||
output_format=metadata_output_format,
|
||||
file_format=task_data.output_format,
|
||||
)
|
||||
else:
|
||||
make_filter_filename = make_filename_callback(req, now=now, suffix="filtered")
|
||||
|
||||
|
@ -76,7 +76,15 @@ var PARAMETERS = [
|
||||
{
|
||||
value: "embed",
|
||||
label: "embed"
|
||||
}
|
||||
},
|
||||
{
|
||||
value: "embed,txt",
|
||||
label: "embed & txt",
|
||||
},
|
||||
{
|
||||
value: "embed,json",
|
||||
label: "embed & json",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user