aboutsummaryrefslogtreecommitdiffstats
path: root/modules/processing.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-05-09 19:40:51 +0000
committerGitHub <noreply@github.com>2023-05-09 19:40:51 +0000
commitd6a9b22c195a0b4b9c6b04ccdfc59c18d099da7a (patch)
tree894f00b92caa229dbfaa2d07c16c25e0167412db /modules/processing.py
parentccbb361845bfabfa3fc2c77bb234ea4be0781dd9 (diff)
parent3ba6c3c83c0983a025c7bddc08bb7f49481b3cbb (diff)
downloadstable-diffusion-webui-gfx803-d6a9b22c195a0b4b9c6b04ccdfc59c18d099da7a.tar.gz
stable-diffusion-webui-gfx803-d6a9b22c195a0b4b9c6b04ccdfc59c18d099da7a.tar.bz2
stable-diffusion-webui-gfx803-d6a9b22c195a0b4b9c6b04ccdfc59c18d099da7a.zip
Merge pull request #10232 from akx/eff
Fix up string formatting/concatenation to f-strings where feasible
Diffstat (limited to 'modules/processing.py')
-rw-r--r--modules/processing.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/modules/processing.py b/modules/processing.py
index e786791a..1a76e552 100644
--- a/modules/processing.py
+++ b/modules/processing.py
@@ -500,7 +500,7 @@ def create_infotext(p, all_prompts, all_seeds, all_subseeds, comments=None, iter
generation_params_text = ", ".join([k if k == v else f'{k}: {generation_parameters_copypaste.quote(v)}' for k, v in generation_params.items() if v is not None])
- negative_prompt_text = "\nNegative prompt: " + p.all_negative_prompts[index] if p.all_negative_prompts[index] else ""
+ negative_prompt_text = f"\nNegative prompt: {p.all_negative_prompts[index]}" if p.all_negative_prompts[index] else ""
return f"{all_prompts[index]}{negative_prompt_text}\n{generation_params_text}".strip()
@@ -780,7 +780,16 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
devices.torch_gc()
- res = Processed(p, output_images, p.all_seeds[0], infotext(), comments="".join(["\n\n" + x for x in comments]), subseed=p.all_subseeds[0], index_of_first_image=index_of_first_image, infotexts=infotexts)
+ res = Processed(
+ p,
+ images_list=output_images,
+ seed=p.all_seeds[0],
+ info=infotext(),
+ comments="".join(f"\n\n{comment}" for comment in comments),
+ subseed=p.all_subseeds[0],
+ index_of_first_image=index_of_first_image,
+ infotexts=infotexts,
+ )
if p.scripts is not None:
p.scripts.postprocess(p, res)