From 1deac2b6458d3cfe258484ba11e14b75383ed01b Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Wed, 28 Sep 2022 18:20:30 +0300 Subject: [PATCH] do nor add log messages to saved iamge parameters --- modules/img2img.py | 2 +- modules/processing.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/img2img.py b/modules/img2img.py index d80b3e75..03e934e9 100644 --- a/modules/img2img.py +++ b/modules/img2img.py @@ -124,4 +124,4 @@ def img2img(mode: int, prompt: str, negative_prompt: str, prompt_style: str, pro if opts.samples_log_stdout: print(generation_info_js) - return processed.images, generation_info_js, plaintext_to_html(processed.info) \ No newline at end of file + return processed.images, generation_info_js, plaintext_to_html(processed.info) diff --git a/modules/processing.py b/modules/processing.py index 358a1b11..4ecdfcd2 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -280,7 +280,7 @@ def create_infotext(p, all_prompts, all_seeds, all_subseeds, comments, iteration negative_prompt_text = "\nNegative prompt: " + p.negative_prompt if p.negative_prompt else "" - return f"{all_prompts[index]}{negative_prompt_text}\n{generation_params_text}".strip() + "".join(["\n\n" + x for x in comments]) + return f"{all_prompts[index]}{negative_prompt_text}\n{generation_params_text}".strip() def process_images(p: StableDiffusionProcessing) -> Processed: @@ -429,7 +429,7 @@ def process_images(p: StableDiffusionProcessing) -> Processed: images.save_image(grid, p.outpath_grids, "grid", all_seeds[0], all_prompts[0], opts.grid_format, info=infotext(), short_filename=not opts.grid_extended_filename, p=p, grid=True) devices.torch_gc() - return Processed(p, output_images, all_seeds[0], infotext(), subseed=all_subseeds[0], all_prompts=all_prompts, all_seeds=all_seeds, all_subseeds=all_subseeds, index_of_first_image=index_of_first_image, infotexts=infotexts) + return Processed(p, output_images, all_seeds[0], infotext() + "".join(["\n\n" + x for x in comments]), subseed=all_subseeds[0], all_prompts=all_prompts, all_seeds=all_seeds, all_subseeds=all_subseeds, index_of_first_image=index_of_first_image, infotexts=infotexts) class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):