aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDavid Yates <dmyates@users.noreply.github.com>2022-09-09 16:16:51 +0200
committerAUTOMATIC1111 <16777216c@gmail.com>2022-09-09 18:19:37 +0300
commit17a7477c7282b0ff16fa1232e5922c0a645e4459 (patch)
tree6b412920a982edd6d52639cde9d6def4f6773a4d /modules
parentab623db52c025eba8a50b0ee13382bc14c21eedd (diff)
Include negative prompt in parameters text file
Diffstat (limited to 'modules')
-rw-r--r--modules/processing.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/processing.py b/modules/processing.py
index d4c4cfad..61c20558 100644
--- a/modules/processing.py
+++ b/modules/processing.py
@@ -145,8 +145,10 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
generation_params.update(p.extra_generation_params)
generation_params_text = ", ".join([k if k == v else f'{k}: {v}' for k, v in generation_params.items() if v is not None])
+
+ negative_prompt_text = "\nNegative prompt: " + p.negative_prompt if p.negative_prompt else ""
- return f"{p.prompt_for_display or prompt}\n{generation_params_text}".strip() + "".join(["\n\n" + x for x in comments])
+ return f"{p.prompt_for_display or prompt}{negative_prompt_text}\n{generation_params_text}".strip() + "".join(["\n\n" + x for x in comments])
if os.path.exists(cmd_opts.embeddings_dir):
model_hijack.load_textual_inversion_embeddings(cmd_opts.embeddings_dir, p.sd_model)